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
This works great. Then while doing some code cleanup I was questioning why I wasn't using the instance method to broadcast in here... So I change it to this
In my mind, this method was cleaner. I tested locally and in staging and it worked fine. No issues.. So I deploy to production, and my chat wasn't necessarily completely broken, but it also wasn't working great. When sending a chat message, only some people would get it. Not everyone. Then when everyone would do a hard refresh, other people would get the messages and new people wouldn't. It was almost like it could only broadcast to like 5 people, but with 10 in chat, half the people wouldn't get it....
It's a very confusing issue. Reverting back to using the broadcast_to fixes it all for me, so I have no clue but wanted to at least document it.
The text was updated successfully, but these errors were encountered:
Channel has a
broadcast
andself.broadcast_to
method. In production, I've been using the class method for sending chat messages.This works great. Then while doing some code cleanup I was questioning why I wasn't using the instance method to broadcast in here... So I change it to this
In my mind, this method was cleaner. I tested locally and in staging and it worked fine. No issues.. So I deploy to production, and my chat wasn't necessarily completely broken, but it also wasn't working great. When sending a chat message, only some people would get it. Not everyone. Then when everyone would do a hard refresh, other people would get the messages and new people wouldn't. It was almost like it could only broadcast to like 5 people, but with 10 in chat, half the people wouldn't get it....
It's a very confusing issue. Reverting back to using the
broadcast_to
fixes it all for me, so I have no clue but wanted to at least document it.The text was updated successfully, but these errors were encountered: