From 6b130eb94775da8675750a0a9aed75fa6f328137 Mon Sep 17 00:00:00 2001 From: Nathan Fritz Date: Wed, 20 Jan 2010 01:42:53 -0800 Subject: unhandled iq's should only respond to errors when type=get/set --- sleekxmpp/stanza/iq.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'sleekxmpp/stanza') diff --git a/sleekxmpp/stanza/iq.py b/sleekxmpp/stanza/iq.py index e3eccfdc..85165e1c 100644 --- a/sleekxmpp/stanza/iq.py +++ b/sleekxmpp/stanza/iq.py @@ -20,10 +20,11 @@ class Iq(RootStanza): self['id'] = '0' def unhandled(self): - self.reply() - self['error']['condition'] = 'feature-not-implemented' - self['error']['text'] = 'No handlers registered for this request.' - self.send() + if self['type'] in ('get', 'set'): + self.reply() + self['error']['condition'] = 'feature-not-implemented' + self['error']['text'] = 'No handlers registered for this request.' + self.send() def result(self): self['type'] = 'result' -- cgit v1.2.3