vukoye / xmpp_dart

Lightweight XMPP client library written in Dart
Apache License 2.0
83 stars 64 forks source link

How to setup priority and resources #20

Closed JiaiHolon closed 4 years ago

JiaiHolon commented 4 years ago

I tried to set up resources as follow lines, however it did not work:

var userAtDomain = '$xmppId@$xmppDomain/Android';
    xmpp.Jid jid = xmpp.Jid.fromFullJid(userAtDomain);
    print("JID resources:" + jid.resource);
    xmpp.XmppAccountSettings account = xmpp.XmppAccountSettings(
        userAtDomain, jid.local, jid.domain, password, 5222);
    account.resource = "Android";

And I did not find any methods to setup presence's priority, do you have any ideas about it?

vukoye commented 4 years ago

Feature was not implemented correctly, fixed with latest pr. Custom resource can be set with xmpp.XmppAccountSettings account = xmpp.XmppAccountSettings( userAtDomain, jid.local, jid.domain, password, 5222, resource: "resource");