diff --git a/app/models/user_my_module.rb b/app/models/user_my_module.rb index 8553630bb..d7c549c6c 100644 --- a/app/models/user_my_module.rb +++ b/app/models/user_my_module.rb @@ -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, diff --git a/app/notifications/recipients/designate_to_my_module_recipients.rb b/app/notifications/recipients/designate_to_my_module_recipients.rb index dbc35e126..ef4c13363 100644 --- a/app/notifications/recipients/designate_to_my_module_recipients.rb +++ b/app/notifications/recipients/designate_to_my_module_recipients.rb @@ -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 +