lib/blather/stanza/iq/command.rb in blather-0.4.11 vs lib/blather/stanza/iq/command.rb in blather-0.4.12
- old
+ new
@@ -39,11 +39,11 @@
command.remove
super
self.action = :execute unless self.action
self
end
-
+
# Overrides the parent method to ensure the reply has no action
#
# @return [self]
def reply!
super
@@ -313,17 +313,10 @@
set_content_for :note, note_text
end
# Returns the command's x:data form child
def form
- if found_x = command.find_first('ns:x', :ns => X.registered_ns)
- x = X.new found_x
- found_x.remove
- else
- x = X.new
- end
- self.command << x
- x
+ X.find_or_create self
end
end #Command
end #Iq
end #Stanza