fixed MucOptions.getName()
This commit is contained in:
		
							parent
							
								
									d6a40a839a
								
							
						
					
					
						commit
						db03470eb4
					
				| @ -384,12 +384,12 @@ public class MucOptions { | |||||||
| 		String name; | 		String name; | ||||||
| 		Field roomConfigName = getRoomInfoForm().getFieldByName("muc#roomconfig_roomname"); | 		Field roomConfigName = getRoomInfoForm().getFieldByName("muc#roomconfig_roomname"); | ||||||
| 		if (roomConfigName != null) { | 		if (roomConfigName != null) { | ||||||
| 			Log.d(Config.LOGTAG,"value of room config name "+roomConfigName.getValue()); |  | ||||||
| 			name = roomConfigName.getValue(); | 			name = roomConfigName.getValue(); | ||||||
| 		} else { | 		} else { | ||||||
| 			List<ServiceDiscoveryResult.Identity> identities = serviceDiscoveryResult.getIdentities(); | 			List<ServiceDiscoveryResult.Identity> identities = serviceDiscoveryResult.getIdentities(); | ||||||
| 			String identityName = identities.size() > 0 ? identities.get(0).getName() : null; | 			String identityName = identities.size() > 0 ? identities.get(0).getName() : null; | ||||||
| 			if (!conversation.getJid().getEscapedLocal().equals(identityName)) { | 			final Jid jid = conversation.getJid(); | ||||||
|  | 			if (identityName != null && !identityName.equals(jid == null ? null : jid.getEscapedLocal())) { | ||||||
| 				name = identityName; | 				name = identityName; | ||||||
| 			} else { | 			} else { | ||||||
| 				name = null; | 				name = null; | ||||||
| @ -715,8 +715,7 @@ public class MucOptions { | |||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	public String getName() { | 	public String getName() { | ||||||
| 		String mucName = this.conversation.getAttribute("muc_name"); | 		return this.conversation.getAttribute("muc_name"); | ||||||
| 		return conversation.getJid().getEscapedLocal().equals(mucName) ? null : mucName; |  | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	private List<User> getFallbackUsersFromCryptoTargets() { | 	private List<User> getFallbackUsersFromCryptoTargets() { | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Daniel Gultsch
						Daniel Gultsch