mirror of
https://github.com/spacebarchat/server.git
synced 2026-04-05 08:35:54 +00:00
fix read del bug
This commit is contained in:
@@ -548,7 +548,7 @@ router.delete(
|
||||
// TODO: handle other read state types
|
||||
if (body.read_state_type != ReadStateType.CHANNEL) return res.status(204).send();
|
||||
|
||||
const readState = await ReadState.findOne({where: {channel_id}});
|
||||
const readState = await ReadState.findOne({ where: { channel_id, user_id: req.user_id } });
|
||||
if (readState) {
|
||||
await readState.remove();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user