fix rubocop

This commit is contained in:
Pranav Raj S 2022-12-21 10:01:51 -08:00
parent 14006e8f31
commit 5ab4906212
4 changed files with 5 additions and 6 deletions

View file

@ -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

View file

@ -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?

View file

@ -1,4 +1,4 @@
# == Schema Information
# == Schema Information
#
# Table name: mentions
#

View file

@ -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