Skip to content
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

Rename "shout" event to "message:created" #156

Open
reichert621 opened this issue Aug 16, 2020 · 6 comments
Open

Rename "shout" event to "message:created" #156

reichert621 opened this issue Aug 16, 2020 · 6 comments
Labels

Comments

@reichert621
Copy link
Collaborator

reichert621 commented Aug 16, 2020

This name is just the default event used when generating new channels in Phoenix, but let's make our event names a bit more descriptive... we already have conversation:created and conversation:updated events, so let's be consistent and add message:created in place of shout.

(Note: we'll probably need to keep "shout" around for backwards compatibility)

@kolharsam
Copy link

@reichert621 I could take a stab at this?

@reichert621
Copy link
Collaborator Author

sure @kolharsam! just wanted to note -- after looking into this a bit more, we'll want to keep the "shout" event around for backward compatibility, so basically what we want to do in this ticket is make sure both shout and message:created events are handled the same :)

@eikooc
Copy link
Contributor

eikooc commented Oct 6, 2020

@reichert621 how do you want to keep the support? Both on the back-end and the front-end or how should I proceed if I want to pick this up? :)

@reichert621
Copy link
Collaborator Author

hey @eikooc! as mentioned above, let's make sure we continue supporting shout for backward compatibility, but change the frontend to use message:created

so the backend change will probably look something like

# just make "shout" an alias for "message:created" for backward compatibility
def handle_in("shout", payload, socket), 
  do: handle_in("message:created", payload, socket)

def handle_in("message:created", payload, socket) do
  # existing logic
end

...or something like that. what do you think?

@eikooc
Copy link
Contributor

eikooc commented Oct 7, 2020

@reichert621 that was also what I was thinking. I just didn't know if you wanted the front-end to also be backwards-compatible such that if two installations happened to use the same database but different versions of the front-end, they would both work.

@reichert621
Copy link
Collaborator Author

reichert621 commented Oct 7, 2020

hmm yeah... didn't think about that edge case 🤔 maybe for now let's just focus on the backend update and make sure both "shout" and "message:created" work the same

(this ticket has been a bit of a low priority, so no rush on this btw -- just think it would be nice to do sooner rather than later if possible)

xprazak2 added a commit to xprazak2/papercups that referenced this issue Dec 22, 2020
Deprecate "shout" event for conversation channel
in favor of "message:created".
xprazak2 added a commit to xprazak2/papercups that referenced this issue Dec 22, 2020
Deprecate "shout" event for conversation channel
in favor of "message:created".
xprazak2 added a commit to xprazak2/papercups that referenced this issue Dec 22, 2020
Deprecate "shout" event for conversation channel
in favor of "message:created".
xprazak2 added a commit to xprazak2/papercups that referenced this issue Jan 1, 2021
Deprecate "shout" event for conversation channel
in favor of "message:created".
xprazak2 added a commit to xprazak2/papercups that referenced this issue Jan 1, 2021
Deprecate "shout" event for conversation channel
in favor of "message:created".
xprazak2 added a commit to xprazak2/papercups that referenced this issue Jan 1, 2021
Deprecate "shout" event for conversation channel
in favor of "message:created".
xprazak2 added a commit to xprazak2/papercups that referenced this issue Jan 1, 2021
Deprecate "shout" event for conversation channel
in favor of "message:created".
xprazak2 added a commit to xprazak2/papercups that referenced this issue Jan 9, 2021
Deprecate "shout" event for conversation channel
in favor of "message:created".
xprazak2 added a commit to xprazak2/papercups that referenced this issue Jan 9, 2021
Deprecate "shout" event for conversation channel
in favor of "message:created".
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants