Skip to content

Open-source live-chat, email support, omni-channel desk. An alternative to Intercom, Zendesk, Salesforce Service Cloud etc. 🔥💬

358 B
Raw Blame
module Api::V1::Accounts::Concerns::InboxSecretManagement
  extend ActiveSupport::Concern

  def reset_secret
    return head :not_found unless @inbox.api?

    @inbox.channel.reset_secret!
  end

  def rotate_hmac_token
    return head :not_found unless @inbox.web_widget? || @inbox.api?

    @inbox.channel.regenerate_hmac_token
    render :show
  end
end