i recently ran into a bug with messages.
when a message that happens to be the first or last message in a conversation gets deleted, mysql automatically sets that column to null.
because of that, if the first or last message is deleted, the conversation won't load anymore and throws an error in the console:
TypeError: Cannot read properties of null (reading 'id')
at te.content (MessageStream.tsx:67:154)
at te.view (MessageStream.tsx:59:72)
at view.l (render.js:37:16)
at render.js:462:45
at g (render.js:414:9)
at f (render.js:297:11)
at render.js:458:4
at g (render.js:411:15)
at render.js:468:9
at g (render.js:414:9)
i fixed it for now by updating the first message id to an existing message in the database, but it should be fixed in the code to prevent the same issue in the future.