Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F1010061
D363-accept-no-context.diff
seigo (Aaron Seigo)
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Authored By
•
seigo
Jan 18 2017, 10:33 AM
2017-01-18 10:33:57 (UTC+1)
Size
817 B
Referenced Files
None
Subscribers
None
D363-accept-no-context.diff
View Options
diff --git a/web/channels/system_channel.ex b/web/channels/system_channel.ex
index 1d076b2..ee18238 100644
--- a/web/channels/system_channel.ex
+++ b/web/channels/system_channel.ex
@@ -16,10 +16,11 @@ defmodule KolabChat.SystemChannel do
]
def join("system", %{"context" => context}, socket) do
- socket = assign(socket, :context, context)
- send self(), :after_join
+ perform_join(context, socket)
+ end
- {:ok, socket}
+ def join("system", _args, socket) do
+ perform_join("default", socket)
end
def handle_info(:after_join, socket) do
@@ -58,4 +59,12 @@ defmodule KolabChat.SystemChannel do
:invalid
end
end
+
+ defp perform_join(context, socket) do
+ socket = assign(socket, :context, context)
+ send self(), :after_join
+
+ {:ok, socket}
+ end
+
end
File Metadata
Details
Attached
Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
440532
Default Alt Text
D363-accept-no-context.diff (817 B)
Attached To
Mode
D363: Better status/presence handling (T2109)
Attached
Detach File
Event Timeline
Log In to Comment