-
Notifications
You must be signed in to change notification settings - Fork 526
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes #156 - Deprecate "shout" event #488
base: master
Are you sure you want to change the base?
Conversation
cca3fa0
to
95e27c5
Compare
I think the removal can be done in 3 steps:
|
95e27c5
to
c37afad
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just one small nitpick, and could we also handle this in the notification_channel
as well?
thanks!
# It is also common to receive messages from the client and | ||
# broadcast to everyone in the current topic (conversation:lobby). | ||
def handle_in("shout", payload, socket) do | ||
defp handle_in_msg(event_name, payload, socket) do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick -- can we name this something like handle_incoming_message
instead? i think it's a bit more explicit :)
also let's move this to the bottom with the other private methods so we can fix the warning below 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I renamed the method and moved it to the bottom - naming is hard ;-)
I also made similar changes in notification_channel
.
351569b
to
2bfd0f6
Compare
@@ -38,6 +38,22 @@ defmodule ChatApiWeb.NotificationChannelTest do | |||
assert_push("shout", _msg) | |||
end | |||
|
|||
test "message:created broadcasts to notification:lobby", %{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like this test is failing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
2bfd0f6
to
a45dda8
Compare
Deprecate "shout" event for conversation channel in favor of "message:created".
a45dda8
to
f20e3c0
Compare
Deprecate "shout" event for conversation channel
in favor of "message:created".
Issue
#156