diff options
Diffstat (limited to 'api/src/routes/channels/#channel_id/messages/index.ts')
-rw-r--r-- | api/src/routes/channels/#channel_id/messages/index.ts | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/api/src/routes/channels/#channel_id/messages/index.ts b/api/src/routes/channels/#channel_id/messages/index.ts index 26bb9e5d..399fa7bb 100644 --- a/api/src/routes/channels/#channel_id/messages/index.ts +++ b/api/src/routes/channels/#channel_id/messages/index.ts @@ -10,7 +10,8 @@ import { getPermission, Message, MessageCreateEvent, - uploadFile + uploadFile, + Member, } from "@fosscord/util"; import { HTTPError } from "lambert-server"; import { handleMessage, postHandleMessage, route } from "@fosscord/api"; @@ -188,6 +189,13 @@ router.post( await channel.assign({ last_message_id: message.id }).save(); + //gosh + var member = await Member.findOneOrFail({ + where: { id: req.user_id }, + }); + await member.assign({ last_message_id: message.id }) + await member.save(); //why does member.assign here return void? + if (channel.isDm()) { const channel_dto = await DmChannelDTO.from(channel); |