not-nullptr / Aerochat

Native rewrite of Aerochat, a WLM 09 themed Discord client
Mozilla Public License 2.0
112 stars 5 forks source link

fix: Messages sent in DMs and Group DMs don't get updated when the DM window is open #12

Closed RealMCoded closed 1 week ago

RealMCoded commented 1 week ago

Fixes this issue posted in the Discord server.

Basically whenever a new message in a group DM or a regular DM is sent, the chat window will not update with the new messages and requires the user to close and re-open the DM window to see new messages.

Happens whenever sending messages as well. It will always show as light grey even though it was sent in the background.

Seems to have occurred because the Guild check happened while in a DM, which returned null. FromMessage accepts null member so we can return a null member if guild is null. (null overload!!)

not-nullptr commented 1 week ago

lets get this shit merged innit