Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
Irere123 committed Jan 31, 2024
2 parents 4bc3f50 + f45b9bb commit e887317
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions api/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -309,11 +309,14 @@ import { verify } from "jsonwebtoken";
wsUsers[m[0].recipientId!].openChatUserId !== req.userId
) {
const userIdOrder = getUserIdOrder(req.userId, m[0].recipientId!);
await db.update(conversationEntity).set({
unfriended: false,
...userIdOrder,
[userIdOrder.userId1 === m[0].recipientId ? "read1" : "read2"]: false,
});
await db
.update(conversationEntity)
.set({
unfriended: false,
...userIdOrder,
[userIdOrder.userId1 === m[0].recipientId ? "read1" : "read2"]: false,
})
.where(eq(conversationEntity.id, conversationId));
}

res.json({ message: m[0] });
Expand Down

0 comments on commit e887317

Please sign in to comment.