Chatwoot/app/presenters/agent_bot_presenter.rb

8 lines
162 B
Ruby
Raw Permalink Normal View History

2021-11-26 19:18:46 +00:00
class AgentBotPresenter < SimpleDelegator
def access_token
return if account_id.blank?
Current.account.id == account_id ? super&.token : nil
end
end