File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
package/src/components/Channel Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -1192,6 +1192,13 @@ const ChannelWithContext = <
11921192 text,
11931193 ...extraFields
11941194 } : Partial < StreamMessage < StreamChatGenerics > > ) => {
1195+ // Exclude following properties from message.user within message preview,
1196+ // since they could be long arrays and have no meaning as sender of message.
1197+ // Storing such large value within user's table may cause sqlite queries to crash.
1198+ // @ts -ignore
1199+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
1200+ const { channel_mutes, devices, mutes, ...messageUser } = client . user ;
1201+
11951202 const preview = {
11961203 __html : text ,
11971204 attachments,
@@ -1209,7 +1216,7 @@ const ChannelWithContext = <
12091216 type : 'regular' ,
12101217 user : {
12111218 id : client . userID ,
1212- ...client . user ,
1219+ ...messageUser ,
12131220 } ,
12141221 ...extraFields ,
12151222 } as unknown as MessageResponse < StreamChatGenerics > ;
You can’t perform that action at this time.
0 commit comments