don't use own jid joined from another client to generate muc title
This commit is contained in:
		
							parent
							
								
									6e95ad4bdf
								
							
						
					
					
						commit
						e127ba9361
					
				| @ -401,11 +401,13 @@ public class MucOptions { | |||||||
| 						break; | 						break; | ||||||
| 					} | 					} | ||||||
| 				} | 				} | ||||||
|  | 				boolean self = user.realJid != null && user.realJid.equals(account.getJid().toBareJid()); | ||||||
| 				if (membersOnly() | 				if (membersOnly() | ||||||
| 						&& nonanonymous() | 						&& nonanonymous() | ||||||
| 						&& user.affiliation.ranks(Affiliation.MEMBER) | 						&& user.affiliation.ranks(Affiliation.MEMBER) | ||||||
| 						&& user.realJid != null | 						&& user.realJid != null | ||||||
| 						&& !realJidInMuc) { | 						&& !realJidInMuc | ||||||
|  | 						&& !self) { | ||||||
| 					user.role = Role.NONE; | 					user.role = Role.NONE; | ||||||
| 					user.avatar = null; | 					user.avatar = null; | ||||||
| 					user.fullJid = null; | 					user.fullJid = null; | ||||||
| @ -517,6 +519,7 @@ public class MucOptions { | |||||||
| 	public List<User> getUsers(int max) { | 	public List<User> getUsers(int max) { | ||||||
| 		ArrayList<User> subset = new ArrayList<>(); | 		ArrayList<User> subset = new ArrayList<>(); | ||||||
| 		HashSet<Jid> jids = new HashSet<>(); | 		HashSet<Jid> jids = new HashSet<>(); | ||||||
|  | 		jids.add(account.getJid().toBareJid()); | ||||||
| 		synchronized (users) { | 		synchronized (users) { | ||||||
| 			for(User user : users) { | 			for(User user : users) { | ||||||
| 				if (user.getRealJid() == null || jids.add(user.getRealJid())) { | 				if (user.getRealJid() == null || jids.add(user.getRealJid())) { | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Daniel Gultsch
						Daniel Gultsch