I have ActionCable channel that identified_by current_user.
class DesktopNotificationsChannel < ApplicationCable::Channel
def subscribed
reject and return unless current_user.present?
logger.add_tags 'ActionCable DesktopNotificationsChannel', current_user.id
stream_for current_user
end
def unsubscribed
# Any cleanup needed when channel is unsubscribed
end
end
And i can subscribe this channel from my dotnet desktop application without any issue with subscribing like this
But when i want to broadcast message from my dotnet app im sending json below with proper encoding
{
"command": "message",
"data": {"status": "current_status"},
"identifier": { "channel": "DesktopNotificationsChannel"}
}
When i debug action message_buffer successfully got message but then nothing happens. I figured that i have to add user id or g_id to message but i couldn’t succeed it, I tried to send channel_parameter like desktop_notification:g_id etc but result didn’t change.
What am i missing?