Sha256: 58e38df3ac8c6361afc9120fd4a3678d403c8d5e619f48ce49a100d6ff5ffcb0
Contents?: true
Size: 597 Bytes
Versions: 20
Compression:
Stored size: 597 Bytes
Contents
module Loco class Sender def initialize recipient, data = {} @recipients = [*recipient] @data = data end def emit uuids.each do |uuid| NotificationCenterChannel.broadcast_to uuid, @data end end private def uuids @recipients.map do |r| if r.is_a? String r elsif r.is_a? Hub r.raw_members.map{ |m| WsConnectionManager.new(m).connected_uuids }.flatten.uniq else WsConnectionManager.new(r).connected_uuids end end.flatten.uniq end end end
Version data entries
20 entries across 20 versions & 1 rubygems