Hi Flow,
Not sure if this is an issue but smack’s iq with no to field or bare jid it doesn’t expect a from filter . Ejabberd when given an iq with no to returns a response with barejid: jabberd:iq:roster.
Smack’s fromfilter - https://github.com/igniterealtime/Smack/blob/b18c6dac62bf6d1da8c0f8ab159d426b257 e4754/smack-core/src/main/java/org/jivesoftware/smack/filter/FromMatchesFilter.j ava- The address to filter for. If null
is given, the stanza(/packet) must not have a from address.
RFC6120 - https://tools.ietf.org/html/rfc6120#section-8.1.1
When the server generates a stanza from the server for delivery to the client on behalf of the account of the connected client (e.g., in the context of data storage services provided by the
server on behalf of the client), the stanza MUST either (a) not include a ‘from’ attribute or (b) include a ‘from’ attribute whose value is the account’s bare JID (localpart@domainpart).
Packet
In IQReplyFilter
fromFilter = new OrFilter();
fromFilter.addFilter(FromMatchesFilter.createFull(to));
if (to == null) {
fromFilter.addFilter(FromMatchesFilter.createBare(local));
fromFilter.addFilter(FromMatchesFilter.createFull(server));
}
else if (to.equals(local.asBareJid())) {
fromFilter.addFilter(FromMatchesFilter.createFull(null));
}
to is null and therefore fromfilter first condition is null. In abstrctjid it’s giving null pointer since from field is present in iq result. It looks wrong to me.