events_archiver.rb: Handle an empty meeting_metadata hash from redis

On my server 2.3 alpha, the method metadata_for(meeting_id) gives back {}
(empty Hash). Thus "return if meeting_metadata.nil?" does not occur.

Does @redis.hgetall give {} instead of nil, even though there is a comment in
node_modules/redis/lib/utils.js "hgetall converts its replies to an Object. If
the reply is empty, null is returned"???
This commit is contained in:
hiroshisuga 2020-08-11 23:04:58 +09:00 committed by Calvin Walton
parent 9d438a525c
commit 3cbe9abaf0

View File

@ -256,7 +256,7 @@ module BigBlueButton
end end
meeting_metadata = @redis.metadata_for(meeting_id) meeting_metadata = @redis.metadata_for(meeting_id)
return if meeting_metadata.nil? return if meeting_metadata.nil? || meeting_metadata.empty?
# Fill in/update the top-level meeting element # Fill in/update the top-level meeting element
if meeting.nil? if meeting.nil?