Skip to content

Commit

Permalink
Migration: Ensure that groupId lookup is kept up to date
Browse files Browse the repository at this point in the history
  • Loading branch information
scottnonnenberg-signal authored and josh-signal committed Nov 23, 2020
1 parent 2c69f2c commit 4bf5a24
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ts/groups.ts
Expand Up @@ -904,7 +904,7 @@ export async function initiateMigrationToGroupV2(
`initiateMigrationToGroupV2/${logId}: After members migration, we are not a member!`
);
}
if (!areWeInvited) {
if (areWeInvited) {
throw new Error(
`initiateMigrationToGroupV2/${logId}: After members migration, we are invited!`
);
Expand Down
4 changes: 2 additions & 2 deletions ts/models/conversations.ts
Expand Up @@ -4332,7 +4332,7 @@ window.Whisper.ConversationCollection = window.Backbone.Collection.extend({
delete this._byUuid[oldValue];
}
if (idProp === 'groupId') {
delete this._byGroupid[oldValue];
delete this._byGroupId[oldValue];
}
}
if (model.get('e164')) {
Expand All @@ -4342,7 +4342,7 @@ window.Whisper.ConversationCollection = window.Backbone.Collection.extend({
this._byUuid[model.get('uuid')] = model;
}
if (model.get('groupId')) {
this._byGroupid[model.get('groupId')] = model;
this._byGroupId[model.get('groupId')] = model;
}
}
);
Expand Down

0 comments on commit 4bf5a24

Please sign in to comment.