mirror of
https://github.com/spacebarchat/server.git
synced 2026-10-22 15:22:43 +00:00
Fix Typing event so that it returns undefined rather than null
Added clean data to message entity so it respects json tags.
This commit is contained in:
1 parent
f9147b78ca
commit
310d292e9a
4 files changed
+11
-22
No files matched your search
@@ -508,7 +508,7 @@ router.post(
|
||||
channel_id: channel_id,
|
||||
data: message.toJSON(),
|
||||
} satisfies MessageCreateEvent),
|
||||
message.guild_id ? Member.update({ id: req.user_id, guild_id: message.guild_id }, { last_message_id: message.id }) : null,
|
||||
message.guild_id ? Member.update({ id: req.user_id, guild_id: message.guild_id }, { last_message_id: message.id }) : undefined,
|
||||
]);
|
||||
|
||||
// no await as it shouldnt block the message send function and silently catch error
|
||||
|
||||
@@ -58,7 +58,7 @@ router.post(
|
||||
channel_id,
|
||||
timestamp,
|
||||
user_id,
|
||||
guild_id: channel.guild_id,
|
||||
guild_id: channel.guild_id ?? undefined,
|
||||
},
|
||||
} satisfies TypingStartEvent);
|
||||
|
||||
|
||||
Reference in new issue
Block a user