[telepathy-gabble/telepathy-gabble-0.8] muc-factory: be sure to check for "user" namespace on child nodes
Jonny Lamb
jonny.lamb at collabora.co.uk
Mon Dec 7 04:12:59 PST 2009
Loudmouth sucks in that it doesn't chain up to its parent's
namespaces, so this small hack will get around this for now. Roll on
Wocky.
Signed-off-by: Jonny Lamb <jonny.lamb at collabora.co.uk>
---
src/muc-factory.c | 19 +++++++++++++++++--
1 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/src/muc-factory.c b/src/muc-factory.c
index 2caba47..ba7d9e7 100644
--- a/src/muc-factory.c
+++ b/src/muc-factory.c
@@ -637,11 +637,20 @@ process_muc_invite (GabbleMucFactory *fac,
x_node = lm_message_node_get_child_with_namespace (message->node, "x",
NS_MUC_USER);
+ /* LM doesn't chain up to its parent's namespaces. boo hoo */
+ if (x_node == NULL)
+ x_node = lm_message_node_get_child (message->node, "x");
+
if (x_node == NULL)
return FALSE;
/* and an invitation? */
- invite_node = lm_message_node_get_child (x_node, "invite");
+ invite_node = lm_message_node_get_child_with_namespace (x_node, "invite",
+ NS_MUC_USER);
+
+ /* LM doesn't chain up to its parent's namespaces. boo hoo */
+ if (invite_node == NULL)
+ invite_node = lm_message_node_get_child (x_node, "invite");
if (invite_node == NULL)
return FALSE;
@@ -975,7 +984,13 @@ muc_factory_presence_cb (LmMessageHandler *handler,
return LM_HANDLER_RESULT_REMOVE_MESSAGE;
}
- item_node = lm_message_node_get_child (x_node, "item");
+ item_node = lm_message_node_get_child_with_namespace (x_node,
+ "item", NS_MUC_USER);
+
+ /* LM doesn't chain up to its parent's namespaces. boo hoo */
+ if (item_node == NULL)
+ item_node = lm_message_node_get_child (x_node, "item");
+
if (item_node == NULL)
{
DEBUG ("node missing 'item' child, ignoring");
--
1.5.6.5
More information about the telepathy-commits
mailing list