|
@@ -12,8 +12,8 @@ class Sessions::Event::Broadcast < Sessions::Event::Base
|
|
|
|
|
|
# broadcast to recipient list
|
|
|
if @payload['recipient']
|
|
|
- if @payload['recipient'].class != Hash
|
|
|
- log 'error', "recipient attribute isn't a hash '#{@payload['recipient'].inspect}'"
|
|
|
+ if @payload['recipient'].class != Hash && @payload['recipient'].class != ActiveSupport::HashWithIndifferentAccess
|
|
|
+ log 'error', "recipient attribute isn't a hash (#{@payload['recipient'].class}) '#{@payload['recipient'].inspect}'"
|
|
|
elsif !@payload['recipient'].key?('user_id')
|
|
|
log 'error', "need recipient.user_id attribute '#{@payload['recipient'].inspect}'"
|
|
|
elsif @payload['recipient']['user_id'].class != Array
|