chore: Improve location display in sidebar (#1509)
- Log IP Address on widget load - Save country code to contact
This commit is contained in:
@@ -38,9 +38,8 @@ class Contact < ApplicationRecord
|
||||
has_many :messages, as: :sender, dependent: :destroy
|
||||
|
||||
before_validation :prepare_email_attribute
|
||||
after_create_commit :dispatch_create_event
|
||||
after_create_commit :dispatch_create_event, :ip_lookup
|
||||
after_update_commit :dispatch_update_event
|
||||
after_commit :ip_lookup
|
||||
|
||||
def get_source_id(inbox_id)
|
||||
contact_inboxes.find_by!(inbox_id: inbox_id).source_id
|
||||
|
||||
Reference in New Issue
Block a user