Prevent error message link mentored in issue #948.
This commit is contained in:
parent
a9b9cdc01d
commit
e3065b1c51
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue