mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-10 17:36:33 +08:00
Merge pull request #3433 from artoscinote/ma_SCI_5607
Also send notification to the user that was unassigned from task [SCI-5607]
This commit is contained in:
commit
3a281ce9dc
1 changed files with 5 additions and 0 deletions
|
@ -38,6 +38,11 @@ module GenerateNotificationModel
|
|||
users = subject.project.users
|
||||
when MyModule
|
||||
users = subject.users
|
||||
# Also send to the user that was unassigned,
|
||||
# and is therefore no longer present on the module.
|
||||
if type_of == 'unassign_user_from_module'
|
||||
users += User.where(id: values.dig('message_items', 'user_target', 'id'))
|
||||
end
|
||||
when Protocol
|
||||
users = subject.in_repository? ? [] : subject.my_module.users
|
||||
when Result
|
||||
|
|
Loading…
Reference in a new issue