{"action":"opened","issue":{"url":"https://api.github.com/repos/processone/ejabberd/issues/827","labels_url":"https://api.github.com/repos/processone/ejabberd/issues/827/labels{/name}","comments_url":"https://api.github.com/repos/processone/ejabberd/issues/827/comments","events_url":"https://api.github.com/repos/processone/ejabberd/issues/827/events","html_url":"https://github.com/processone/ejabberd/issues/827","id":115689154,"number":827,"title":"Pubsub normal chat message having type=headline when published from offline storage","user":{"login":"kartikpatel11","id":11901778,"avatar_url":"https://avatars.githubusercontent.com/u/11901778?v=3","gravatar_id":"","url":"https://api.github.com/users/kartikpatel11","html_url":"https://github.com/kartikpatel11","followers_url":"https://api.github.com/users/kartikpatel11/followers","following_url":"https://api.github.com/users/kartikpatel11/following{/other_user}","gists_url":"https://api.github.com/users/kartikpatel11/gists{/gist_id}","starred_url":"https://api.github.com/users/kartikpatel11/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kartikpatel11/subscriptions","organizations_url":"https://api.github.com/users/kartikpatel11/orgs","repos_url":"https://api.github.com/users/kartikpatel11/repos","events_url":"https://api.github.com/users/kartikpatel11/events{/privacy}","received_events_url":"https://api.github.com/users/kartikpatel11/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-11-07T20:12:01Z","updated_at":"2015-11-07T20:12:01Z","closed_at":null,"body":"Hi,\r\nI seem to have observerd weird behavior with offline messages(type=normal) when they get published on pubsub node. Not sure if its intentional but want to highlight it. shouldn't the pubsub offline message also get published as type=normal instead of type=headline?\r\n\r\nBelow is the scenario:\r\n1. Create pubsub node with notification_type as normal using smack library\r\n\r\n2015-11-08 00:42:46.591 [debug] <0.602.0>@mod_pubsub:tree_call:4067 tree_call <<\"pubsub.abc.example.com\">> set_node [{pubsub_node,{<<\"pubsub.abc.example.com\">>,<<\"630461e0c584464096849dd451343b60\">>},29,[],<<\"flat\">>,[{<<\"+999999\">>,<<\"abc.example.com\">>,<<>>}],[{presence_based_delivery,false},{notification_type,normal},{publish_model,open},{access_model,open},{persist_items,false},{notify_retract,false},{deliver_payloads,true},{notify_config,false},{notify_delete,false},{purge_offline,false},{max_items,10},{subscribe,true},{roster_groups_allowed,[]},{max_payload_size,60000},{send_last_published_item,on_sub_and_presence},{deliver_notifications,true}]}]\r\n\r\n2. publisher publishes message to pubsub node. \r\n\r\n<iq to='pubsub.chat.votesup.com' id='Jk749-95' type='set'>\r\n  <pubsub xmlns='http://jabber.org/protocol</pubsub'>\r\n  <publish node='630461e0c584464096849dd451343b60'>\r\n     <item>\r\n       <x xmlns=\\\"jabber:x:oob\\\">\r\n         <file1url>1446923856478961000.jpeg</file1url>\r\n         <postuuid>a3f75ef0-9d39-42b8-8c86-91aa497b56ca</postuuid>\r\n         <from>+888888</from>\r\n       </x>\r\n    </item>\r\n  </publish>\r\n </pubsub>\r\n</iq>\r\n\r\n3. The message is deliverd to online users of pubsub node as normal chat message (without type=headline tag)\r\n\r\n<message from='pubsub.chat.votesup.com' to='+777777@abc.example.com'>\r\n  <event xmlns='http://jabber.org/protocol/pubsub#event'>\r\n     <items node='630461e0c584464096849dd451343b60'>\r\n        <item id='5A6E18D118E80'>\r\n          <x xmlns='jabber:x:oob'>\r\n            <file1url>1446923856478961000.jpeg</file1url>\r\n            <postuuid>a3f75ef0-9d39-42b8-8c86-91aa497b56ca</postuuid>\r\n            <from>+888888</from>\r\n         </x>\r\n       </item>\r\n    </items>\r\n  </event>\r\n</message>\r\n\r\n3. receiver is offline so message goes to offline queue of receiver.\r\n\r\n4. receiver become online and message pulled from offline storage. however, this time , the same message has type=headline\r\n\r\n\r\n<message from='pubsub.abc.example.com' to='+999999@abc.example.com'>\r\n  <event xmlns='http://jabber.org/protocol/pubsub#event'>\r\n      <items type='headline' node='630461e0c584464096849dd451343b60'>\r\n         <item id='5A6E18D118E80'>\r\n            <x xmlns='jabber:x:oob'>\r\n               <file1url>1446923856478961000.jpeg</file1url>\r\n               <postuuid>a3f75ef0-9d39-42b8-8c86-91aa497b56ca</postuuid>\r\n               <from>+888888</from>\r\n           </x>\r\n         </item>\r\n      </items>\r\n  </event>\r\n  <delay xmlns='urn:xmpp:delay' from='+888888@abc.example.com/+888888' stamp='2015-11-07T19:17:37Z'></delay>\r\n</message>\r\n"}}