chore: fix the failing user destroy for admin (#3223)
- fix the invitee association on the user - handle Instagram events with inbox missing
This commit is contained in:
@@ -38,7 +38,9 @@ class Webhooks::InstagramEventsJob < ApplicationJob
|
||||
|
||||
def create_test_text
|
||||
messenger_channel = Channel::FacebookPage.last
|
||||
@inbox = ::Inbox.find_by!(channel: messenger_channel)
|
||||
@inbox = ::Inbox.find_by(channel: messenger_channel)
|
||||
return unless @inbox
|
||||
|
||||
@contact_inbox = @inbox.contact_inboxes.where(source_id: 'sender_username').first
|
||||
unless @contact_inbox
|
||||
@contact_inbox ||= @inbox.channel.create_contact_inbox(
|
||||
|
||||
Reference in New Issue
Block a user