Skip to content

Commit 0082352

Browse files
committed
fix: deleted message type resolution
1 parent aca34a7 commit 0082352

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

package/src/components/MessageList/MessageFlashList.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -217,22 +217,22 @@ const getItemTypeInternal = (message: LocalMessage) => {
217217
return 'message-with-shared-location';
218218
}
219219

220-
if (message.deleted_at) {
221-
return 'deleted-message';
222-
}
223-
224220
if (message.text) {
225221
return 'message-with-text';
226222
}
227223

228224
return 'message-with-nothing';
229225
}
230226

227+
if (message.type === 'deleted') {
228+
return 'deleted-message';
229+
}
230+
231231
if (message.type === 'system') {
232232
return 'system-message';
233233
}
234234

235-
return 'unresolvable-type';
235+
return 'generic-message';
236236
};
237237

238238
const MessageFlashListWithContext = (props: MessageFlashListPropsWithContext) => {

0 commit comments

Comments
 (0)