mirror of
https://github.com/basecamp/once-campfire.git
synced 2026-08-19 05:13:46 +09:00
df76a227dc
First open source release of Campfire 🎉
15 lines
326 B
Ruby
15 lines
326 B
Ruby
class TypingNotificationsChannel < RoomChannel
|
|
def start(data)
|
|
broadcast_to @room, action: :start, user: current_user_attributes
|
|
end
|
|
|
|
def stop(data)
|
|
broadcast_to @room, action: :stop, user: current_user_attributes
|
|
end
|
|
|
|
private
|
|
def current_user_attributes
|
|
current_user.slice(:id, :name)
|
|
end
|
|
end
|