Remove exceeded line (#10290)

This commit is contained in:
Brunno Souza 2020-09-17 14:28:03 -03:00 committed by GitHub
parent 19c8d219bc
commit 9272da5ee8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -188,8 +188,7 @@ class ChatChannelMembershipsController < ApplicationController
if params[:user_action] == "accept"
membership = ChatChannelMembership.find_by(user_id: current_user.id, chat_channel_id: chat_channel.id)
if !membership
membership = ChatChannelMembership.new(user_id: current_user.id, chat_channel_id: chat_channel.id)
membership.save
membership = ChatChannelMembership.create(user_id: current_user.id, chat_channel_id: chat_channel.id)
unless membership&.errors&.any?
send_chat_action_message("@#{membership.user.username} join the channel", current_user, chat_channel.id,
"joined")