Bug 35205 - Support PEP
Summary: Support PEP
Status: RESOLVED FIXED
Alias: None
Product: Telepathy
Classification: Unclassified
Component: salut (show other bugs)
Version: git master
Hardware: Other All
: medium normal
Assignee: Telepathy bugs list
QA Contact: Telepathy bugs list
URL: http://cgit.freedesktop.org/~jonny/te...
Whiteboard: review+
Keywords: patch
Depends on: 34932
Blocks:
  Show dependency treegraph
 
Reported: 2011-03-11 03:10 UTC by Jonny Lamb
Modified: 2011-04-22 03:47 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

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.