mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-26 01:35:34 +08:00
Fix recipients for my_module designation notifications [SCI-9863]
This commit is contained in:
parent
c0bc77024b
commit
7ba4efe30c
2 changed files with 4 additions and 2 deletions
|
@ -9,8 +9,6 @@ class UserMyModule < ApplicationRecord
|
|||
belongs_to :my_module, inverse_of: :user_my_modules, touch: true
|
||||
|
||||
def log_activity(type_of, current_user)
|
||||
return if current_user.id == user.id
|
||||
|
||||
Activities::CreateActivityService
|
||||
.call(activity_type: type_of,
|
||||
owner: current_user,
|
||||
|
|
|
@ -7,7 +7,11 @@ module Recipients
|
|||
def activity_recipients
|
||||
activity = Activity.find(@params[:activity_id])
|
||||
user = User.find_by(id: activity.values.dig('message_items', 'user_target', 'id'))
|
||||
|
||||
return [] if user.id == activity.owner_id
|
||||
|
||||
[user]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue