diff options
Diffstat (limited to 'app/models/chat_name.rb')
-rw-r--r-- | app/models/chat_name.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/app/models/chat_name.rb b/app/models/chat_name.rb index 38e6273bf20..b413da01f24 100644 --- a/app/models/chat_name.rb +++ b/app/models/chat_name.rb @@ -11,6 +11,13 @@ class ChatName < ApplicationRecord validates :chat_id, uniqueness: { scope: :team_id } + attr_encrypted :token, + mode: :per_attribute_iv, + algorithm: 'aes-256-gcm', + key: Settings.attr_encrypted_db_key_base_32, + encode: false, + encode_iv: false + # Updates the "last_used_timestamp" but only if it wasn't already updated # recently. # |