Skip to content

Commit

Permalink
support pins in all related stream types (#622)
Browse files Browse the repository at this point in the history
if i'm not mistaken, we also need to check for dm+gdm channel payloads
here since we now support pins in all 3 channel types — did not yet test
this, just noticed it when going through the code :)
  • Loading branch information
erikolsson authored Aug 6, 2024
1 parent d678275 commit e4f4234
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/sdk/src/streamStateView_Members.ts
Original file line number Diff line number Diff line change
Expand Up @@ -399,8 +399,12 @@ export class StreamStateView_Members extends StreamStateView_AbstractContent {
const newPin = { creatorUserId, event } satisfies Pin
this.pins.push(newPin)
if (
event.remoteEvent.event.payload.case === 'channelPayload' &&
event.remoteEvent.event.payload.value.content.case === 'message'
(event.remoteEvent.event.payload.case === 'channelPayload' &&
event.remoteEvent.event.payload.value.content.case === 'message') ||
(event.remoteEvent.event.payload.case === 'dmChannelPayload' &&
event.remoteEvent.event.payload.value.content.case === 'message') ||
(event.remoteEvent.event.payload.case === 'gdmChannelPayload' &&
event.remoteEvent.event.payload.value.content.case === 'message')
) {
this.decryptEvent(
'channelMessage',
Expand Down

0 comments on commit e4f4234

Please sign in to comment.