summary refs log tree commit diff
path: root/src/api/routes
diff options
context:
space:
mode:
authorPuyodead1 <puyodead@proton.me>2023-12-05 13:22:04 -0500
committerPuyodead1 <puyodead@proton.me>2023-12-05 13:22:04 -0500
commite54879e1fec195deb9c87361bd5c6477ffe052bd (patch)
tree268c1f68a2fe6d55cc74c1a5fde21d9dbe31d84b /src/api/routes
parentfix some message update fields being sent when null (diff)
downloadserver-e54879e1fec195deb9c87361bd5c6477ffe052bd.tar.xz
messageupdate: fix member not being correct format
Diffstat (limited to 'src/api/routes')
-rw-r--r--src/api/routes/channels/#channel_id/messages/#message_id/index.ts7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/api/routes/channels/#channel_id/messages/#message_id/index.ts b/src/api/routes/channels/#channel_id/messages/#message_id/index.ts
index 57670fc2..c4d2e1e8 100644
--- a/src/api/routes/channels/#channel_id/messages/#message_id/index.ts
+++ b/src/api/routes/channels/#channel_id/messages/#message_id/index.ts
@@ -109,7 +109,11 @@ router.patch(
 			await emitEvent({
 				event: "MESSAGE_UPDATE",
 				channel_id,
-				data: { ...new_message.toJSON(), nonce: undefined },
+				data: {
+					...new_message.toJSON(),
+					nonce: undefined,
+					member: new_message.member?.toPublicMember(),
+				},
 			} as MessageUpdateEvent),
 		]);
 
@@ -121,6 +125,7 @@ router.patch(
 			id: new_message.id,
 			type: new_message.type,
 			channel_id: new_message.channel_id,
+			member: new_message.member?.toPublicMember(),
 			author: new_message.author?.toPublicUser(),
 			attachments: new_message.attachments,
 			embeds: new_message.embeds,