Skip to content

Commit

Permalink
Add deleted flag to messages and update delete logic
Browse files Browse the repository at this point in the history
  • Loading branch information
xuelink committed Apr 4, 2024
1 parent c61c767 commit e756052
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/controllers/message.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ export default class MessageController {
roomId: roomId,
replyTo: replyTo,
seen: false,
deleted: false,
type: type,
body: null,
image: null,
Expand Down Expand Up @@ -306,7 +307,13 @@ export default class MessageController {
env.APP_DATABASE,
env.MESSAGES_COLLECTION,
messageId,
{ body: "_deleted_" }
{
deleted: true,
type: "body",
body: "[deleted message]",
image: null,
audio: null,
}
);
console.log(message);

Expand Down

0 comments on commit e756052

Please sign in to comment.