mirror of
https://github.com/spacebarchat/server.git
synced 2026-05-28 07:34:43 +00:00
User mentions: use user_id IN (...) rather than user_id = ... OR user_id = ...
This commit is contained in:
@@ -788,7 +788,7 @@ async function handleMessageMentionsAsync(message: Message) {
|
||||
}
|
||||
if (users.size) {
|
||||
const repository = ReadState.getRepository();
|
||||
const condition = { user_id: Or(...[...users].map((id) => Equal(id))), channel_id: channel.id, read_state_type: ReadStateType.CHANNEL };
|
||||
const condition = { user_id: In(users.values().toArray()), channel_id: channel.id, read_state_type: ReadStateType.CHANNEL };
|
||||
|
||||
await fillInMissingIDs([...users]);
|
||||
await repository.increment(condition, "mention_count", 1);
|
||||
|
||||
Reference in New Issue
Block a user