سؤال

I am receiving messages from a pubsub service using the latest Openfire.

<message xmlns="jabber:client" from="pubsub.macbook-air.local" to="test3@macbook-air.local/76925b59" id="test1dff_test3@macbook-air.local__a0BOh"><event xmlns="http://jabber.org/protocol/pubsub#event"><items node="fakenode11"><item id="XdXSqryf797e5bs"><body xmlns="http://jabber.org/protocol/pubsub">Here is yet another message</body></item></items></event><headers xmlns="http://jabber.org/protocol/shim"><header name="pubsub#subid">lrDeJ4lehr1q7BPLz3kbXBfHdbyNTto5FxepioO5</header></headers></message>

Note that there is no "publisher" attribute. Is there any way to find out who published an item to a pubsub feed? I definitely need that information as the implementation resembles a community bulletin board, but can't figure out if the ability to configure this is hiding somewhere or if I can't find it because this feature doesn't exist.

See the spec below...

Thanks!

7.1.2.3 Item Publisher

If configured to do so, the service can include the publisher of the item when it generates event notifications.

Example 103. Service Notifies Subscribers

<message from='pubsub.shakespeare.lit' to='francisco@denmark.lit' id='foo'>
  <event xmlns='http://jabber.org/protocol/pubsub#event'>
    <items node='princely_musings'>
      <item id='ae890ac52d0df67ed7cfdf51b644e901'
            publisher='hamlet@denmark.lit'>
        [ ... ENTRY ... ]
      </item>
    </items>
  </event>
</message>

Thanks!

It looks like I will just send the sender along inside a custom tag to the server, such as and see if that works.

هل كانت مفيدة؟

المحلول

I do not think OpenFire support this option yet. It seems that ejabberd supports it with this patch: https://support.process-one.net/browse/EJAB-1347

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top