powered by Jive Software

destroy.getJid() is null

I am using smack4.1.9 on Android,when a room destroy,I get a callback,but the jid is null:

SmackManager.getInstance().getConnection().addSyncStanzaListener(new StanzaListener() {
            @Override
            public void processPacket(Stanza packet) {
                MUCUser mucUser = MUCUser.from(packet);
                if(mucUser == null){
                    return;
                }
                Destroy destroy = mucUser.getDestroy();
                if(destroy != null){
                    XLog.d("destroy:" + destroy.getJid());
                }
            }
        }, PresenceTypeFilter.UNAVAILABLE);

Have you checked the stanza log to see, whether or not the stanza that came in included a jid?

Yeah,stanza included a jid and I solved it by getting jid from stanza directly.

Could you please show us the stanza where Destroy.getJid() does return null?

XLog.d(“destroy:” + destroy.getJid());
This log shows me.

Yep, but it would help enormous if you could show us the full underlying stanza.

This topic was automatically closed 62 days after the last reply. New replies are no longer allowed.