diff --git a/app/controllers/api/v1/accounts/integrations/dyte_controller.rb b/app/controllers/api/v1/accounts/integrations/dyte_controller.rb index 14889753e..4c909434c 100644 --- a/app/controllers/api/v1/accounts/integrations/dyte_controller.rb +++ b/app/controllers/api/v1/accounts/integrations/dyte_controller.rb @@ -10,7 +10,7 @@ class Api::V1::Accounts::Integrations::DyteController < Api::V1::Accounts::BaseC def add_participant_to_meeting return render json: { error: 'Invalid Data' }, status: :unprocessable_entity if @message.content_type == 'integations' - response= dyte_processor_service.add_participant_to_meeting(@message.content_attributes['data']['meeting_id'], Current.user) + response = dyte_processor_service.add_participant_to_meeting(@message.content_attributes['data']['meeting_id'], Current.user) render json: response end diff --git a/app/controllers/api/v1/widget/messages_controller.rb b/app/controllers/api/v1/widget/messages_controller.rb index d1160afa0..d0b58d52f 100644 --- a/app/controllers/api/v1/widget/messages_controller.rb +++ b/app/controllers/api/v1/widget/messages_controller.rb @@ -29,7 +29,7 @@ class Api::V1::Widget::MessagesController < Api::V1::Widget::BaseController def add_participant_to_meeting return render json: { error: 'Invalid Data' }, status: :unprocessable_entity if @message.content_type == 'integations' - response= dyte_processor_service.add_participant_to_meeting(@message.content_attributes['data']['meeting_id'], @message.conversation.contact) + response = dyte_processor_service.add_participant_to_meeting(@message.content_attributes['data']['meeting_id'], @message.conversation.contact) render json: response end @@ -39,7 +39,6 @@ class Api::V1::Widget::MessagesController < Api::V1::Widget::BaseController Integrations::Dyte::ProcessorService.new(account: @web_widget.inbox.account, conversation: @message) end - def build_attachment return if params[:message][:attachments].blank? diff --git a/app/models/mention.rb b/app/models/mention.rb index 0e0fe762a..e37a7eca2 100644 --- a/app/models/mention.rb +++ b/app/models/mention.rb @@ -1,4 +1,4 @@ -# == Schema Information + # == Schema Information # # Table name: mentions # diff --git a/lib/integrations/dyte/processor_service.rb b/lib/integrations/dyte/processor_service.rb index 9d79f0316..ed62b8772 100644 --- a/lib/integrations/dyte/processor_service.rb +++ b/lib/integrations/dyte/processor_service.rb @@ -28,14 +28,14 @@ class Integrations::Dyte::ProcessorService end def add_participant_to_meeting(meeting_id, user) - response = dyte_client.add_participant_to_meeting(meeting_id, user.id, user.name, avatar_url(user)) - response + dyte_client.add_participant_to_meeting(meeting_id, user.id, user.name, avatar_url(user)) end private def avatar_url(user) return user.avatar_url if user.avatar_url.present? + "#{ENV.fetch('FRONTEND_URL', nil)}/integrations/slack/user.png" end