Tuesday 15 April 2014

python 2.7 - sleekxmpp send message to all the resource with same user name -



python 2.7 - sleekxmpp send message to all the resource with same user name -

i trying send message user-b resources logged in username user-a. first resource lone logged in getting message. similar presence beingness broadcast resources within user. there way using sleek-xmpp?

i tried using send_message

self.send_message(mto='usera@testserver', mbody='sending - chat message ', mtype='chat')

but received first resource logged in .

the server using openfire .

it not sender, nor sender's server, recipient's server controls of recipient's resources receive message type='chat'. typically, based on priority of presences set recipient's resources.

there workarounds, though:

use type='headline' message (https://tools.ietf.org/html/rfc6121#section-5.2.2):

if 'to' address bare jid, receiving server should deliver message of recipient's available resources non-negative presence priority , must deliver message @ to the lowest degree 1 of resources;

ask recipient utilize clients back upwards xep-0280. allows clients opt-in receiving every chat message.

if have subscription recipient's presence, can send separate message each resource, that's bad thought in many regards (one of them: can cause duplicates in offline storage if resources went offline in mean time).

python-2.7 xmpp

No comments:

Post a Comment