continue updating contacts on error

This commit is contained in:
Roland Osborne 2022-06-12 21:40:32 -07:00
parent 2f0b442e30
commit c75a9a2cea

View File

@ -65,6 +65,7 @@ export function useCardContext() {
}
const { cardDetail, cardProfile } = cur.data;
if (cardDetail.status === 'connected') {
try {
if (cur.data.profileRevision != card.data.notifiedProfile) {
let message = await getContactProfile(cardProfile.node, cardProfile.guid, cardDetail.token);
await setCardProfile(access.current, card.id, message);
@ -96,6 +97,16 @@ export function useCardContext() {
cur.data.notifiedChannel = card.data.notifiedChannel;
}
}
catch (err) {
// contact update failed
console.log(err);
cur.channels = new Map();
cur.articles = new Map();
cur.revision = 0;
cards.current.set(card.id, cur);
continue;
}
}
else {
cur.channels = new Map();
cur.articles = new Map();