1 parent 1316f1d commit a64f19fCopy full SHA for a64f19f
1 file changed
src/events/decoders/mutations.ts
@@ -38,6 +38,14 @@ const textOf = (message: proto.IMessage | null | undefined): string => {
38
if (typeof vidCaption === 'string') return vidCaption
39
const docCaption = message.documentMessage?.caption
40
if (typeof docCaption === 'string') return docCaption
41
+ const rich = message.botForwardedMessage?.message?.richResponseMessage ?? message.richResponseMessage
42
+ const submessages = rich?.submessages
43
+ if (Array.isArray(submessages)) {
44
+ const parts = submessages
45
+ .map((s) => s?.messageText)
46
+ .filter((t): t is string => typeof t === 'string' && t.length > 0)
47
+ if (parts.length > 0) return parts.join('\n')
48
+ }
49
return ''
50
}
51
0 commit comments