Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A workflow for private messaging #1

Open
krazyjakee opened this issue Mar 19, 2017 · 0 comments
Open

A workflow for private messaging #1

krazyjakee opened this issue Mar 19, 2017 · 0 comments

Comments

@krazyjakee
Copy link

krazyjakee commented Mar 19, 2017

After reading the code and trying out this plugin, I better understand the standard for being able to subscribe and authorize to a specific user. However, I can only ever seem to do it one way.

I'm working with a resource ([email protected]/resource) which I'm not sure this plugin supports but I couldn't get a clear picture from the data being sent back and forth to ejabberd whether this was an issue or not. In any case, this was always false for me, even after checking the roster manually to ensure the to jid existed.

So my workflow was simply to add a jid: roster.add(jid, username, ['friends'])
Then subscribe: roster.subscribe(jid)

On the other client, it would receive the subscribe presence, check if they existed in the friends list and then roster.authorize(jid). Both clients would do this because the friends list exists outside of ejabberd and syncs with the roster. However, the problem is I could never ever get them to say subscribed="both". It would say "from" and "to" and there was nothing I could do about it.

What am I missing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant