You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lib/chat_api_web/channels/conversation_channel.ex
+15-5Lines changed: 15 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -3,6 +3,7 @@ defmodule ChatApiWeb.ConversationChannel do
3
3
4
4
aliasChatApiWeb.Presence
5
5
aliasChatApi.{Messages,Conversations}
6
+
requireLogger
6
7
7
8
@impltrue
8
9
defjoin("conversation:lobby",payload,socket)do
@@ -80,20 +81,29 @@ defmodule ChatApiWeb.ConversationChannel do
80
81
{:reply,{:ok,payload},socket}
81
82
end
82
83
84
+
defhandle_in("shout",payload,socket)do
85
+
Logger.notice("'shout' is deprecated as event name on a new message and will be removed in a future version. Please migrate to a newer version of a client.")
86
+
handle_in_msg"shout",payload,socket
87
+
end
88
+
89
+
defhandle_in("message:created",payload,socket)do
90
+
handle_in_msg"message:created",payload,socket
91
+
end
92
+
83
93
# It is also common to receive messages from the client and
84
94
# broadcast to everyone in the current topic (conversation:lobby).
0 commit comments