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

Roster Support #784

Open
ShadowRanger opened this issue Oct 4, 2019 · 2 comments
Open

Roster Support #784

ShadowRanger opened this issue Oct 4, 2019 · 2 comments

Comments

@ShadowRanger
Copy link

I can see that there have already been a couple of issues created about this, and that there was once functionality for it in this library. Are there any updates on this at all, in terms of plans of re-adding it to the library?

@wichert
Copy link
Contributor

wichert commented Nov 22, 2019

This is implemented in https://github.com/Crypho/xmpp-plugins . We have an open offer to move that into the xmppjs organisation.

@sonnyp
Copy link
Member

sonnyp commented Nov 23, 2019

@ShadowRanger it is very easy to do yourself:

const roster = await xmpp.iqCaller.get(xml('query', 'jabber:iq:roster'))
console.log(roster.getChildren('item',  'jabber:iq:roster'))

But anyway, this is on my radar (and on my hard drive :p ) but a few things need to be figured out first.

@wichert I have issues with crypho/xmpp-plugins

  1. The xml <-> javascript transformation. While it can make sense at application level (I'd avoid it if possible though), I don't think it belongs in xmpp.js.

  2. Without the transformation mentionned aboved, most plugins (including many that I wrote) don't provide enough value to justify their inclusion in xmpp.js as most features are usually just a iqCaller.get/set away. It does make the protocol slightly simpler but not enough that users wouldn't have to read/understand specifications anyway.

To address 1 I plan on writing documentation on how to use storage and state management such as redux with xmpp.js specifically with @xmpp/xml elements without the need for transforming.

To address 2 I'm considering providing storage/state management within xmpp.js (replacable and modular as the rest of xmpp.js) .

Such thing would allow providing out of the box xmpp features that requires storage. Such as roster versioning, entity capabilities, mam, ...

It could also provide offline support for other features such as messaging, pubsub, ...

As well as support stream resumption accross tab/app/process restart/reload.

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

No branches or pull requests

3 participants