Bug 35205

Summary: Support PEP
Product: Telepathy Reporter: Jonny Lamb <jonny.lamb>
Component: salutAssignee: Telepathy bugs list <telepathy-bugs>
Status: RESOLVED FIXED QA Contact: Telepathy bugs list <telepathy-bugs>
Severity: normal    
Priority: medium Keywords: patch
Version: git master   
Hardware: Other   
OS: All   
URL: http://cgit.freedesktop.org/~jonny/telepathy-salut/log?h=link-local-pep
Whiteboard: review+
i915 platform: i915 features:
Bug Depends on: 34932    
Bug Blocks:    

Description Jonny Lamb 2011-03-11 03:10:16 UTC
PEP on link-local XMPP is funky. Here's some stuff to make it work.

It depends on the meta-porter stuff.
Comment 1 Jonny Lamb 2011-04-07 04:55:42 UTC
Branch updated for latest master and blah blah blah.

Even made the function part of public API so plugins can use it.
Comment 2 Will Thompson 2011-04-14 11:00:10 UTC
im-manager: only deal with messages for this manager
We only like no subtype and subtype="chat" messages.

+  wocky_stanza_get_type_info (stanza, NULL, &sub_type);
+
+  /* we only handle messages without a sub type here */
+  if (sub_type != WOCKY_STANZA_SUB_TYPE_NONE
+      && sub_type != WOCKY_STANZA_SUB_TYPE_CHAT)
+    return FALSE;

the commit message, comment and code don't agree.

Also, what about type='error'? and type='headline'? They're perfectly reasonable types for messages. I think this is secret code for using a higher-priority handler for pubsub event messages, maybe?

Why does salut_send_ll_pep_event() have two different local variables for the contact factory?

You could extract send_ll_pep_event_to_contact (WockyLLContact *, WockyStanza *) to reduce the code duplication between the loop and the self-contact blocks.
Comment 3 Jonny Lamb 2011-04-22 01:42:33 UTC
(In reply to comment #2)
> I think this is secret code for using a
> higher-priority handler for pubsub event messages, maybe?

OK.

> Why does salut_send_ll_pep_event() have two different local variables for the
> contact factory?

Odd, fixed.

> You could extract send_ll_pep_event_to_contact (WockyLLContact *, WockyStanza
> *) to reduce the code duplication between the loop and the self-contact blocks.

Yeah, done.

Updated. Some other related little things fixed in this branch too.
Comment 4 Jonny Lamb 2011-04-22 03:47:05 UTC
Perfetto.

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.