Skip to content

Commit

Permalink
Key solicitation correctness fix - key local and dispatched solicitat…
Browse files Browse the repository at this point in the history
…ions in sync

I don’t know if this caused any actual issues, but I’m going to be modifying this structure and it seems weird that we didn’t preserve the sort here.
  • Loading branch information
texuf committed Oct 21, 2024
1 parent c1749b7 commit aa04210
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/sdk/src/streamStateView_Members_Solicitations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,19 @@ export class StreamStateView_Members_Solicitations {
user.solicitations = user.solicitations.filter(
(x) => x.deviceKey !== solicitation.deviceKey,
)
user.solicitations.push({
const newSolicitation = {
deviceKey: solicitation.deviceKey,
fallbackKey: solicitation.fallbackKey,
isNewDevice: solicitation.isNewDevice,
sessionIds: [...solicitation.sessionIds.sort()],
})

}
user.solicitations.push(newSolicitation)
encryptionEmitter?.emit(
'newKeySolicitation',
this.streamId,
user.userId,
user.userAddress,
solicitation,
newSolicitation,
)
}

Expand Down

0 comments on commit aa04210

Please sign in to comment.