Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/rocketchat-lib/server/lib/notifyUsersOnMessage.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ RocketChat.callbacks.add('afterSaveMessage', function(message, room) {

// Update all other subscriptions to alert their owners but witout incrementing
// the unread counter, as it is only for mentions and direct messages
// If a room is hidden, it will remain hidden
RocketChat.models.Subscriptions.setAlertForRoomIdExcludingUserId(message.rid, message.u._id);

return message;
Expand Down
1 change: 0 additions & 1 deletion packages/rocketchat-lib/server/models/Subscriptions.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,6 @@ class ModelSubscriptions extends RocketChat.models._Base
update =
$set:
alert: true
open: true

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

setAlertForRoomIdExcludingUserId is only called in one place and there was no expectation of the side effect of updating the room 'open' property.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was not a bug :) it was intended. If you want a different behaviour, we need to make it configurable.

return @update query, update, { multi: true }

Expand Down