not-nullptr / Aerochat

Native rewrite of Aerochat, a WLM 09 themed Discord client
Mozilla Public License 2.0
148 stars 8 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 2 months ago

RealMCoded commented 2 months 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 2 months ago

lets get this shit merged innit