chore: Add Chatwoot SDK to Chatwoot Dashboard (#1726)

Add Chatwoot SDK to Chatwoot Dashboard
This commit is contained in:
Pranav Raj S
2021-02-08 16:38:35 +05:30
committed by GitHub
parent f46c4b5130
commit d4c2a78db6
14 changed files with 481 additions and 266 deletions

View File

@@ -109,6 +109,13 @@ class User < ApplicationRecord
self[:display_name].presence || name
end
def hmac_identifier
hmac_key = GlobalConfig.get('CHATWOOT_INBOX_HMAC_KEY')['CHATWOOT_INBOX_HMAC_KEY']
return OpenSSL::HMAC.hexdigest('sha256', hmac_key, email) if hmac_key.present?
''
end
def account
current_account_user&.account
end