fix rubocop
This commit is contained in:
parent
14006e8f31
commit
5ab4906212
4 changed files with 5 additions and 6 deletions
|
@ -10,7 +10,7 @@ class Api::V1::Accounts::Integrations::DyteController < Api::V1::Accounts::BaseC
|
||||||
def add_participant_to_meeting
|
def add_participant_to_meeting
|
||||||
return render json: { error: 'Invalid Data' }, status: :unprocessable_entity if @message.content_type == 'integations'
|
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
|
render json: response
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@ class Api::V1::Widget::MessagesController < Api::V1::Widget::BaseController
|
||||||
def add_participant_to_meeting
|
def add_participant_to_meeting
|
||||||
return render json: { error: 'Invalid Data' }, status: :unprocessable_entity if @message.content_type == 'integations'
|
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
|
render json: response
|
||||||
end
|
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)
|
Integrations::Dyte::ProcessorService.new(account: @web_widget.inbox.account, conversation: @message)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
def build_attachment
|
def build_attachment
|
||||||
return if params[:message][:attachments].blank?
|
return if params[:message][:attachments].blank?
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# == Schema Information
|
# == Schema Information
|
||||||
#
|
#
|
||||||
# Table name: mentions
|
# Table name: mentions
|
||||||
#
|
#
|
||||||
|
|
|
@ -28,14 +28,14 @@ class Integrations::Dyte::ProcessorService
|
||||||
end
|
end
|
||||||
|
|
||||||
def add_participant_to_meeting(meeting_id, user)
|
def add_participant_to_meeting(meeting_id, user)
|
||||||
response = dyte_client.add_participant_to_meeting(meeting_id, user.id, user.name, avatar_url(user))
|
dyte_client.add_participant_to_meeting(meeting_id, user.id, user.name, avatar_url(user))
|
||||||
response
|
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def avatar_url(user)
|
def avatar_url(user)
|
||||||
return user.avatar_url if user.avatar_url.present?
|
return user.avatar_url if user.avatar_url.present?
|
||||||
|
|
||||||
"#{ENV.fetch('FRONTEND_URL', nil)}/integrations/slack/user.png"
|
"#{ENV.fetch('FRONTEND_URL', nil)}/integrations/slack/user.png"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue