lib/lifen/flow.rb in lifen-0.1.2 vs lib/lifen/flow.rb in lifen-0.1.3
- old
+ new
@@ -44,10 +44,10 @@
json = client.post("central/api/chats/#{uuid}/detach_users?rel=activeUsers", params)
self.active_users = []
- json["activeUsers"].each do |element|
+ Array(json["activeUsers"]).each do |element|
self.active_users << Lifen::User.new(element)
end
users.each do |user|
raise Lifen::Error, "User #{user.uuid} was not detached to this flow" if active_users.map(&:uuid).include? user.uuid
\ No newline at end of file