lib/blather/stanza/message.rb in blather-0.6.1 vs lib/blather/stanza/message.rb in blather-0.6.2

- old
+ new

@@ -178,9 +178,13 @@ node.children.detect do |e| ns = e.namespace ? e.namespace.href : nil klass = class_from_registration(e.element_name, ns) end + if klass == Blather::Stanza::Presence::MUCUser + klass = Blather::Stanza::Message::MUCUser + end + if klass && klass != self && ![Blather::Stanza::X, Blather::Stanza::Iq].include?(klass) klass.import(node) else new(node[:type]).inherit(node) end