Commit d5054abf authored by http://jneen.net/'s avatar http://jneen.net/

add Member#notifiable?(type, opts)

parent 7e7f602d
......@@ -332,4 +332,8 @@ class Member < ActiveRecord::Base
def notification_service
NotificationService.new
end
def notifiable?(type, opts={})
raise 'abstract'
end
end
......@@ -30,6 +30,10 @@ class GroupMember < Member
'Group'
end
def notifiable?(type, opts={})
NotificationRecipientService.notifiable?(user, type, { group: group }.merge(opts))
end
private
def send_invite
......
......@@ -87,6 +87,10 @@ class ProjectMember < Member
project.owner == user
end
def notifiable?(type, opts={})
NotificationRecipientService.notifiable?(user, type, { project: project }.merge(opts))
end
private
def delete_member_todos
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment