mirror of
https://github.com/balzack/databag.git
synced 2025-02-14 12:39:17 +00:00
continue updating contacts on error
This commit is contained in:
parent
2f0b442e30
commit
c75a9a2cea
@ -65,6 +65,7 @@ export function useCardContext() {
|
|||||||
}
|
}
|
||||||
const { cardDetail, cardProfile } = cur.data;
|
const { cardDetail, cardProfile } = cur.data;
|
||||||
if (cardDetail.status === 'connected') {
|
if (cardDetail.status === 'connected') {
|
||||||
|
try {
|
||||||
if (cur.data.profileRevision != card.data.notifiedProfile) {
|
if (cur.data.profileRevision != card.data.notifiedProfile) {
|
||||||
let message = await getContactProfile(cardProfile.node, cardProfile.guid, cardDetail.token);
|
let message = await getContactProfile(cardProfile.node, cardProfile.guid, cardDetail.token);
|
||||||
await setCardProfile(access.current, card.id, message);
|
await setCardProfile(access.current, card.id, message);
|
||||||
@ -96,6 +97,16 @@ export function useCardContext() {
|
|||||||
cur.data.notifiedChannel = card.data.notifiedChannel;
|
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 {
|
else {
|
||||||
cur.channels = new Map();
|
cur.channels = new Map();
|
||||||
cur.articles = new Map();
|
cur.articles = new Map();
|
||||||
|
Loading…
Reference in New Issue
Block a user