Skip to content

Commit

Permalink
Update room_channel.rb (publiclab#9834)
Browse files Browse the repository at this point in the history
Solved this first-timer-issue
  • Loading branch information
Diptime authored and 17sushmita committed Jul 7, 2021
1 parent 68fe12d commit a7810c4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions app/channels/room_channel.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ def unsubscribed
end

def speak(message)
return unless current_user && current_user.admin?

return unless current_user&.admin?
ActionCable.server.broadcast 'room_channel', message: message["message"]
end
end

0 comments on commit a7810c4

Please sign in to comment.