XEP-0172
This commit is contained in:
		
							parent
							
								
									85b31b8d8b
								
							
						
					
					
						commit
						ec6220969d
					
				| @ -49,7 +49,7 @@ public class PresenceParser extends AbstractParser implements | |||||||
| 		if (packet.getFrom() == null) { | 		if (packet.getFrom() == null) { | ||||||
| 			return; | 			return; | ||||||
| 		} | 		} | ||||||
| 		String[] fromParts = packet.getFrom().split("/"); | 		String[] fromParts = packet.getFrom().split("/", 2); | ||||||
| 		String type = packet.getAttribute("type"); | 		String type = packet.getAttribute("type"); | ||||||
| 		if (fromParts[0].equals(account.getJid())) { | 		if (fromParts[0].equals(account.getJid())) { | ||||||
| 			if (fromParts.length == 2) { | 			if (fromParts.length == 2) { | ||||||
| @ -60,7 +60,6 @@ public class PresenceParser extends AbstractParser implements | |||||||
| 					account.removePresence(fromParts[1]); | 					account.removePresence(fromParts[1]); | ||||||
| 				} | 				} | ||||||
| 			} | 			} | ||||||
| 
 |  | ||||||
| 		} else { | 		} else { | ||||||
| 			Contact contact = account.getRoster().getContact(packet.getFrom()); | 			Contact contact = account.getRoster().getContact(packet.getFrom()); | ||||||
| 			if (type == null) { | 			if (type == null) { | ||||||
| @ -108,6 +107,10 @@ public class PresenceParser extends AbstractParser implements | |||||||
| 					contact.setOption(Contact.Options.PENDING_SUBSCRIPTION_REQUEST); | 					contact.setOption(Contact.Options.PENDING_SUBSCRIPTION_REQUEST); | ||||||
| 				} | 				} | ||||||
| 			} | 			} | ||||||
|  | 			Element nick = packet.findChild("nick", "http://jabber.org/protocol/nick"); | ||||||
|  | 			if (nick != null) { | ||||||
|  | 				contact.setSystemName(nick.getContent()); | ||||||
|  | 			} | ||||||
| 		} | 		} | ||||||
| 		mXmppConnectionService.updateRosterUi(); | 		mXmppConnectionService.updateRosterUi(); | ||||||
| 	} | 	} | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Gayaz Yusipov
						Gayaz Yusipov