Bug 36647

Summary: GTalk email-to-chat follow up makes email subject appear as message
Product: Telepathy Reporter: Danielle Madeley <danielle>
Component: gabbleAssignee: Will Thompson <will>
Status: RESOLVED FIXED QA Contact: Telepathy bugs list <telepathy-bugs>
Severity: normal    
Priority: medium CC: chandniverma2112
Version: git master   
Hardware: Other   
OS: All   
URL: https://gitorious.org/glassrose-gnome/telepathy-gabble/commits/filter-out-google-rbc-announcement-messages-36647
Whiteboard:
i915 platform: i915 features:

Description Danielle Madeley 2011-04-27 19:25:24 UTC
Clicking "Reply by chat to Danielle" causes the email subject to appear in Gabble as the first message of a conversation.

The first message the initiator actually typed was "Hi!"

It looks like GMail sends the subject as a message body, but also includes google:metadata google-rbc-announcement = true (I'm guessing rbc is reply-by-chat). I believe we should filter these messages out, or relay them to clients via a different message-type.

~

_end_element_ns: Received stanza
* message xmlns='jabber:client' from='juliet@gmail.com/gmail.7C461C03' to='danielle@c.c.uk' type='chat'
    * body
        "haven't seen you online lately"
    * google-mail-signature xmlns='google:metadata'
        "6mxS_FhEHNuf31zjjIfLuSrj0Ls"
    * google-rbc-announcement xmlns='google:metadata'
        "true"
    * x xmlns='google:nosave' value='disabled'
    * record xmlns='http://jabber.org/protocol/archive' otr='false'

_end_element_ns: Received stanza
* message xmlns='jabber:client' from='juliet@gmail.com/gmail.7C461C03' to='danielle@c.c.uk' type='chat' id='5D13BCC9B0B8337A_43' iconset='classic'
    * body
        "Hi!"
    * google-mail-signature xmlns='google:metadata'
        "B5Su2M-X-D-F7gM66QS_5PLGpnA"
    * thread
        "1302591160.5136.10.camel@adelie"
    * subject
        "haven't seen you online lately"
    * active xmlns='http://jabber.org/protocol/chatstates'
    * x xmlns='google:nosave' value='disabled'
    * record xmlns='http://jabber.org/protocol/archive' otr='false'
Comment 1 Chandni Verma 2011-05-10 08:21:43 UTC
A have a patch for it in the linked branch where I have simply removed these messages which contain no special information.
Comment 2 Danielle Madeley 2011-05-10 16:29:57 UTC
     {
+	  if (lm_message_node_get_child_with_namespace (

Wrong indentation.

+			  wocky_stanza_get_top_node(message),

Missing space.

+	  {
+		  /* Message information is redundant. We can safely filter such
+		   * messages out.
+		   * Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=36647 */

Wrong indentation.

Also I'm not sure this comment is useful.

+	  }
       if (type == NULL &&

Missing empty line between end of block and start of next.

http://telepathy.freedesktop.org/wiki/Style
Comment 3 Chandni Verma 2011-05-11 03:45:41 UTC
(In reply to comment #2)
>      {
> +      if (lm_message_node_get_child_with_namespace (
> 
> Wrong indentation.
> 
> +              wocky_stanza_get_top_node(message),
> 
> Missing space.
> 
> +      {
> +          /* Message information is redundant. We can safely filter such
> +           * messages out.
> +           * Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=36647 */
> 
> Wrong indentation.

Done.

> 
> Also I'm not sure this comment is useful.

Ok, removed the comment, just left the bug url so that its easy for those who are not acquainted with a stanza of this name.

> 
> +      }
>        if (type == NULL &&
> 
> Missing empty line between end of block and start of next.
> 
> http://telepathy.freedesktop.org/wiki/Style

Done.
Comment 4 Danielle Madeley 2011-05-11 21:02:14 UTC
+      if (lm_message_node_get_child_with_namespace (
+              wocky_stanza_get_top_node (message),
+              "google-rbc-announcement", "google:metadata") != NULL)
+      {
+          /* Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=36647 */

       ^ bracket at wrong level
         ^ should be here
Comment 5 Chandni Verma 2011-05-12 02:07:21 UTC
Oh, yes. Done. [[attention deficit syndrome]]
Comment 6 Will Thompson 2011-05-24 05:35:26 UTC
Looks good. I'm cherry-picking it onto the 0.12 stable branch of Gabble, and just running the tests before merging to master and pushing.
Comment 7 Chandni Verma 2011-05-24 06:00:58 UTC
thanks :)
Comment 8 Will Thompson 2011-05-24 06:39:22 UTC
Merged, albeit messily (my fault), to 0.12 and master.

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.