Minimize downstream effects of storage sync
This commit is contained in:
parent
b914b59969
commit
9002b21a6b
2 changed files with 17 additions and 5 deletions
|
@ -457,12 +457,19 @@ export async function mergeGroupV2Record(
|
|||
|
||||
updateConversation(conversation.attributes);
|
||||
|
||||
const isGroupNewToUs = !isNumber(conversation.get('revision'));
|
||||
const isFirstSync = !isNumber(window.storage.get('manifestVersion'));
|
||||
const dropInitialJoinMessage = isFirstSync;
|
||||
waitThenMaybeUpdateGroup({
|
||||
conversation,
|
||||
dropInitialJoinMessage,
|
||||
});
|
||||
|
||||
// We don't need to update GroupV2 groups all the time. We fetch group state the first
|
||||
// time we hear about these groups, from then on we rely on incoming messages or
|
||||
// the user opening that conversation.
|
||||
if (isGroupNewToUs) {
|
||||
waitThenMaybeUpdateGroup({
|
||||
conversation,
|
||||
dropInitialJoinMessage,
|
||||
});
|
||||
}
|
||||
|
||||
return hasPendingChanges;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue