Skip to content

Commit 9f64925

Browse files
committed
feat: override getThreadId()
1 parent f7170a7 commit 9f64925

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

api/src/extensions/channels/chatui/wrapper.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,16 @@ export default class ChaUiWebEventWrapper<
2525
constructor(handler: T, event: Web.Event, channelData: any) {
2626
super(handler, event, channelData);
2727
}
28+
29+
/**
30+
* Retrieves the thread id to which the message belongs to
31+
*
32+
* @returns Thread id
33+
*/
34+
getThreadId(): string {
35+
if ('thread' in this._adapter.raw) {
36+
return this._adapter.raw.thread;
37+
}
38+
return undefined;
39+
}
2840
}

0 commit comments

Comments
 (0)