On Friday, April 24, 2015 at 4:35:13 PM UTC-5, Simon Hill wrote:
> I've been wrestling with trying to programmatically add contacts to a 
> user's roster. I've been trying to do this client-side by logging in as 
> user A, sending subscribe to B, logging in as B, accepting the subscribe, 
> sending subscribe back to A, and accepting B's subscribe. The problem is 
> that my 3rd party XMPP client is also logged in as A or B or both, and 
> there seems to be some interference that prevents all the events firing as 
> they should. The process appears to work if A and B are not logged on 
> anywhere else, but stop short in an 'to' and 'from' state if they are.
> Here's my client-side (actually node.js server side) script.
> https://gist.github.com/metalaureate/b2011cc375764b28d5fe 
> <https://www.google.com/url?q=https%3A%2F%2Fgist.github.com%2Fmetalaureate%2Fb2011cc375764b28d5fe&sa=D&sntz=1&usg=AFQjCNFv3tnazjiW1Qxo5SpWQvyR8hyERw>
> Is there a less shonky way to do this?

I use the groups feature, to publish a list of all the contacts I want to 
default on each person's chat. (ie, all our staff)
groups_file = "/etc/prosody/groups/corp.txt
where the file is a text file with:
b...@corp.com=Bob Smith
sa...@corp.com=Sally Struthers

They automatically show up on everyone's chat, the next time the person 
logs in.

> Thank you for any ideas!
> Simon

You received this message because you are subscribed to the Google Groups 
"prosody-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prosody-dev+unsubscr...@googlegroups.com.
To post to this group, send email to prosody-dev@googlegroups.com.
Visit this group at http://groups.google.com/group/prosody-dev.
For more options, visit https://groups.google.com/d/optout.

Reply via email to