mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-26 16:22:06 +01:00
1. The packet id is parsed while parsing Messages
2. Parsed Messages and Presences could now have EMPTY ids git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@2224 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
parent
627b38fe5b
commit
0b26452666
1 changed files with 4 additions and 1 deletions
|
@ -653,6 +653,8 @@ class PacketReader {
|
|||
*/
|
||||
private Packet parseMessage(XmlPullParser parser) throws Exception {
|
||||
Message message = new Message();
|
||||
String id = parser.getAttributeValue("", "id");
|
||||
message.setPacketID(id == null ? Packet.ID_NOT_AVAILABLE : id);
|
||||
message.setTo(parser.getAttributeValue("", "to"));
|
||||
message.setFrom(parser.getAttributeValue("", "from"));
|
||||
message.setType(Message.Type.fromString(parser.getAttributeValue("", "type")));
|
||||
|
@ -730,7 +732,8 @@ class PacketReader {
|
|||
Presence presence = new Presence(type);
|
||||
presence.setTo(parser.getAttributeValue("", "to"));
|
||||
presence.setFrom(parser.getAttributeValue("", "from"));
|
||||
presence.setPacketID(parser.getAttributeValue("", "id"));
|
||||
String id = parser.getAttributeValue("", "id");
|
||||
presence.setPacketID(id == null ? Packet.ID_NOT_AVAILABLE : id);
|
||||
|
||||
// Parse sub-elements
|
||||
boolean done = false;
|
||||
|
|
Loading…
Reference in a new issue