Summary: | Backlog messages for users not in a MUC are dropped or received as private messages | ||
---|---|---|---|
Product: | Wocky | Reporter: | Marco Barisione <marco.barisione> |
Component: | General | Assignee: | Telepathy bugs list <telepathy-bugs> |
Status: | RESOLVED FIXED | QA Contact: | Telepathy bugs list <telepathy-bugs> |
Severity: | normal | ||
Priority: | medium | Keywords: | patch |
Version: | unspecified | ||
Hardware: | Other | ||
OS: | All | ||
URL: | http://git.collabora.co.uk/?p=user/wjt/wocky.git;a=shortlog;h=refs/heads/muc | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Bug Depends on: | 27964 | ||
Bug Blocks: |
Description
Marco Barisione
2010-04-30 07:47:03 UTC
Here's a failing test case: http://git.collabora.co.uk/?p=user/wjt/telepathy-gabble-wjt.git;a=shortlog;h=refs/heads/fd.o-27913-broken-muc-scrollback AFAICT MUC scrollback is previously entirely untested, which is pretty cool. But this test passes for scrollback from ourself and another current MUC member. It only fails when we hit the scrollback message from someone not in the MUC: AssertionError: expected: '/org/freedesktop/Telepathy/Connection/gabble/jabber/test_40localhost_2fResource/MucChannel1' got: '/org/freedesktop/Telepathy/Connection/gabble/jabber/test_40localhost_2fResource/ImChannel4' FAIL: muc/scrollback.py This is a WockyMuc bug. In wocky-muc.c, handle_message(): who = g_hash_table_lookup (priv->members, from); if (who == NULL) { /* not another member, is it from 'ourselves'? */ gchar *from_jid = wocky_normalise_jid (from); /* is it from us? fake up a member struct */ if (g_str_equal (from_jid, priv->jid)) { from_self = TRUE; g_free (from_jid); } else { DEBUG ("Message received from unknown MUC member %s.", from_jid); g_free (from_jid); return FALSE; } } The else block is wrong. I fixed this, because I was looking at the MUC code anyway while fixing things for bug 27964. The branch refactors the function which handles MUC messages a bunch to be a bit clearer, and fixes some stuff that was mis-translated from the Gabble code. Unfortunately it added 24 lines of code. I consider this a personal failure. Merged courtesy of review by Sjoerd! The snapshot in gabble 0.9.12 will include this fix. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.