I test it step by step again.
smack 4.1.0 alpha5
1、aaaaa login by spark. bbbbb login by my android app.
2、aaaaa invite bbbbb to join an Room, and aaaaa send message to bbbbb.
<message from="aaaaa_dqj@conference.bzwang" to="bbbbb@bzwang"><x xmlns="http://jabber.org/protocol/muc#user"><invite from="aaaaa@bzwang"><reason>请把我加入会议中。</reason></invite></x><x xmlns="jabber:x:conference" jid="aaaaa_dqj@conference.bzwang"/></message>
3、bbbbb received the invitation, add use join() to join the room, so it will be sent message as below.
<presence id='XBxJG-11' to='aaaaa_dqj@conference.bzwang/bbbbb'><x xmlns='http://jabber.org/protocol/muc'><history maxstanzas='20'/></x></presence>
[
the XEP45 7.2.2 give an example :
Example 20. User Seeks to Enter a Room (Multi-User Chat)
<presence
from='hag66@shakespeare.lit/pda'
id='n13mt3l'
to='coven@chat.shakespeare.lit/thirdwitch'>
<x xmlns='http://jabber.org/protocol/muc'/>
</presence>
my app send message to join an room do not contains "from" attribute, is that necessary?
I debugged smack source in file AbstractXMPPConnection.java in line 649 mothed public PacketCollector createPacketCollectorAndSend(PacketFilter packetFilter, Packet packet), and can not find when add "packet" to the filed resultQueue in object packetCollector(add breakpoints at all the possible line).
]
4、and then bbbbb receive the reponse Message:
<presence id="7M3Qk-53" to="bbbbb@bzwang/Smack" from="aaaaa_dqj@conference.bzwang/aaaaa"><x xmlns="vcard-temp:x:update"><photo>72d317a59bd28792676a28c19676df928f17abd6</ph oto></x><x xmlns="jabber:x:avatar"><hash>72d317a59bd28792676a28c19676df928f17abd6</hash></ x><x xmlns="http://jabber.org/protocol/muc#user"><item jid="aaaaa@bzwang/Spark 2.6.3" affiliation="owner" role="moderator"/></x></presence>
<presence id="XBxJG-11" to="bbbbb@bzwang/Smack" from="aaaaa_dqj@conference.bzwang/bbbbb"><x xmlns="http://jabber.org/protocol/muc#user"><item jid="bbbbb@bzwang/Smack" affiliation="none" role="participant"/></x></presence>