aboutsummaryrefslogtreecommitdiff
path: root/xmpp-vala/src/module/iq
diff options
context:
space:
mode:
Diffstat (limited to 'xmpp-vala/src/module/iq')
-rw-r--r--xmpp-vala/src/module/iq/module.vala10
1 files changed, 8 insertions, 2 deletions
diff --git a/xmpp-vala/src/module/iq/module.vala b/xmpp-vala/src/module/iq/module.vala
index abcc271c..f73f5459 100644
--- a/xmpp-vala/src/module/iq/module.vala
+++ b/xmpp-vala/src/module/iq/module.vala
@@ -83,8 +83,14 @@ namespace Xmpp.Iq {
}
public interface Handler : Object {
- public abstract void on_iq_get(XmppStream stream, Iq.Stanza iq);
- public abstract void on_iq_set(XmppStream stream, Iq.Stanza iq);
+ public virtual void on_iq_get(XmppStream stream, Iq.Stanza iq) {
+ Iq.Stanza bad_request = new Iq.Stanza.error(iq, new ErrorStanza.bad_request("unexpected IQ get for this namespace"));
+ stream.get_module(Module.IDENTITY).send_iq(stream, bad_request);
+ }
+ public virtual void on_iq_set(XmppStream stream, Iq.Stanza iq) {
+ Iq.Stanza bad_request = new Iq.Stanza.error(iq, new ErrorStanza.bad_request("unexpected IQ set for this namespace"));
+ stream.get_module(Module.IDENTITY).send_iq(stream, bad_request);
+ }
}
}