diff options
author | Siraj Razick <siraj.razick@collabora.co.uk> | 2011-07-20 20:38:52 +0530 |
---|---|---|
committer | Marco Barisione <marco@barisione.org> | 2011-08-05 14:45:26 +0100 |
commit | 051a35f63b42d6d5ef274b12a606ec30821ab1b7 (patch) | |
tree | d90bac01ce945d9557f2ff2a19d2bc0e1ec11fa1 | |
parent | faf9011d6d9ee075deaee3ff4ea77a73c17561cd (diff) |
Avoid filtering all PEP messages
This patch filters only a fixed set of PEP messages, with
+notify
-rw-r--r-- | wocky/wocky-c2s-porter.c | 34 |
1 files changed, 24 insertions, 10 deletions
diff --git a/wocky/wocky-c2s-porter.c b/wocky/wocky-c2s-porter.c index 4abafce..1521c5b 100644 --- a/wocky/wocky-c2s-porter.c +++ b/wocky/wocky-c2s-porter.c @@ -1006,21 +1006,35 @@ static void build_queueable_stanza_patterns (WockyC2SPorter *self) { WockyC2SPorterPrivate *priv = self->priv; - WockyStanza *pattern; + gchar **node_name = NULL; + gchar *node_names [] = { + "http://jabber.org/protocol/geoloc", + "http://jabber.org/protocol/nick", + "http://laptop.org/xmpp/buddy-properties", + "http://laptop.org/xmpp/activities", + "http://laptop.org/xmpp/current-activity", + "http://laptop.org/xmpp/activity-properties", + NULL}; if (priv->queueable_stanza_patterns != NULL) return; - /* all PEP updates are queueable */ - pattern = wocky_stanza_build (WOCKY_STANZA_TYPE_MESSAGE, - WOCKY_STANZA_SUB_TYPE_NONE, NULL, NULL, - '(', "event", - ':', WOCKY_XMPP_NS_PUBSUB_EVENT, - ')', - NULL); + for (node_name = node_names; *node_name != NULL ; node_name++) + { + WockyStanza *pattern = wocky_stanza_build ( + WOCKY_STANZA_TYPE_MESSAGE, + WOCKY_STANZA_SUB_TYPE_NONE, NULL, NULL, + '(', "event", + ':', WOCKY_XMPP_NS_PUBSUB_EVENT, + '(', "items", + '@', "node", *node_name, + ')', + ')', + NULL); - priv->queueable_stanza_patterns = g_list_prepend ( - priv->queueable_stanza_patterns, pattern); + priv->queueable_stanza_patterns = g_list_prepend ( + priv->queueable_stanza_patterns, pattern); + } } static gboolean |