feat: API to Filter reports by teams (#3066)
Add API to Filter reports by teams Fixes: #2916
This commit is contained in:
@@ -40,4 +40,12 @@ class Team < ApplicationRecord
|
||||
def remove_member(user_id)
|
||||
team_members.find_by(user_id: user_id)&.destroy
|
||||
end
|
||||
|
||||
def messages
|
||||
account.messages.where(conversation_id: conversations.pluck(:id))
|
||||
end
|
||||
|
||||
def events
|
||||
account.events.where(conversation_id: conversations.pluck(:id))
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user