Skip to content

Commit 47034b8

Browse files
authored
re-add recipient (#4500)
this fell off when adding encryption
1 parent 1ec80a6 commit 47034b8

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

packages/sdk/src/views/models/timelineEvent.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -599,19 +599,25 @@ function toTownsContent_ChannelPayload(
599599
case 'custom':
600600
return { error: `Custom payload not supported: ${description}` }
601601
case 'interactionRequest': {
602+
const recipient = value.content.value.recipient
603+
? bin_toHexString(value.content.value.recipient)
604+
: undefined
602605
if (timelineEvent.decryptedContent?.kind === 'interactionRequestPayload') {
603606
return {
604607
content: {
605608
kind: RiverTimelineEvent.InteractionRequest,
606609
payload: timelineEvent.decryptedContent.content,
610+
recipient,
607611
} satisfies InteractionRequestEvent,
608612
}
609613
}
614+
610615
// If not decrypted yet, show as encrypted
611616
return {
612617
content: {
613618
kind: RiverTimelineEvent.InteractionRequestEncrypted,
614619
error: timelineEvent.decryptedContentError,
620+
recipient,
615621
} satisfies InteractionRequestEncryptedEvent,
616622
}
617623
}

packages/sdk/src/views/models/timelineTypes.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,11 +185,13 @@ export interface InceptionEvent {
185185
export interface InteractionRequestEvent {
186186
kind: RiverTimelineEvent.InteractionRequest
187187
payload?: PlainMessage<InteractionRequestPayload>
188+
recipient?: string
188189
}
189190

190191
export interface InteractionRequestEncryptedEvent {
191192
kind: RiverTimelineEvent.InteractionRequestEncrypted
192193
error?: DecryptionSessionError
194+
recipient?: string
193195
}
194196

195197
export interface InteractionResponseEvent {

0 commit comments

Comments
 (0)