FIX: delay chat notify watching job (#28386)
This change delays the notify watching job to allow time for message to be marked as seen within chat. Without a slight delay the job fires straight away and often means that messages are seen on screen but the user also receives a notification due to Chat::Notifier.user_has_seen_message? returning false.
This commit is contained in:
parent
060933d064
commit
e16f22c372
|
@ -370,7 +370,8 @@ module Chat
|
|||
end
|
||||
|
||||
def notify_watching_users(except: [])
|
||||
Jobs.enqueue(
|
||||
Jobs.enqueue_in(
|
||||
5.seconds,
|
||||
Jobs::Chat::NotifyWatching,
|
||||
{ chat_message_id: @chat_message.id, except_user_ids: except, timestamp: @timestamp.to_s },
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue