1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2025-09-10 18:59:41 +02:00

Bump jxmpp to 0.5.0-alpha5 and change Roster API

to only allow bare JIDs as roster entires.
This commit is contained in:
Florian Schmaus 2015-06-06 09:00:19 +02:00
parent 2f219c7317
commit 58402c5615
16 changed files with 111 additions and 114 deletions

View file

@ -48,7 +48,7 @@ public class FromMatchesFilter implements StanzaFilter {
*/
public FromMatchesFilter(Jid address, boolean ignoreResourcepart) {
if (address != null && ignoreResourcepart) {
this.address = address.withoutResource();
this.address = address.asBareJid();
}
else {
this.address = address;
@ -99,7 +99,7 @@ public class FromMatchesFilter implements StanzaFilter {
}
if (ignoreResourcepart) {
from = from.withoutResource();
from = from.asBareJid();
}
return from.equals(address);
}

View file

@ -44,7 +44,7 @@ public class BindIQProvider extends IQProvider<Bind> {
bind = Bind.newSet(Resourcepart.from(resourceString));
break;
case "jid":
EntityFullJid fullJid = JidCreate.fullFrom(parser.nextText());
EntityFullJid fullJid = JidCreate.entityFullFrom(parser.nextText());
bind = Bind.newResult(fullJid);
break;
}

View file

@ -76,7 +76,7 @@ public class ParserUtils {
if (jidString == null) {
return null;
}
return JidCreate.bareFrom(jidString);
return JidCreate.entityBareFrom(jidString);
}
public static Resourcepart getResourcepartAttribute(XmlPullParser parser, String name) throws XmppStringprepException {

View file

@ -67,7 +67,7 @@ public class DummyConnection extends AbstractXMPPConnection {
private EntityFullJid getUserJid() {
try {
return JidCreate.fullFrom(config.getUsername()
return JidCreate.entityFullFrom(config.getUsername()
+ "@"
+ config.getXMPPServiceDomain()
+ "/"