made our spanish friends happy. fixed #68
This commit is contained in:
		
							parent
							
								
									d140ef6390
								
							
						
					
					
						commit
						04418484a2
					
				|  | @ -152,8 +152,10 @@ public class Contact extends AbstractEntity implements Serializable { | |||
| 				return false; | ||||
| 			} else { | ||||
| 				return (domainParts[0].equals("conf") | ||||
| 						|| domainParts[0].equals("conference") || domainParts[0] | ||||
| 							.equals("muc")); | ||||
| 						|| domainParts[0].equals("conference") | ||||
| 						|| domainParts[0].equals("muc") | ||||
| 						|| domainParts[0].equals("sala") | ||||
| 						|| domainParts[0].equals("salas")); | ||||
| 			} | ||||
| 		} | ||||
| 	} | ||||
|  | @ -198,7 +200,8 @@ public class Contact extends AbstractEntity implements Serializable { | |||
| 		Set<String> set = new HashSet<String>(); | ||||
| 		try { | ||||
| 			if (this.keys.has("otr_fingerprints")) { | ||||
| 				JSONArray fingerprints = this.keys.getJSONArray("otr_fingerprints"); | ||||
| 				JSONArray fingerprints = this.keys | ||||
| 						.getJSONArray("otr_fingerprints"); | ||||
| 				for (int i = 0; i < fingerprints.length(); ++i) { | ||||
| 					set.add(fingerprints.getString(i)); | ||||
| 				} | ||||
|  | @ -262,7 +265,7 @@ public class Contact extends AbstractEntity implements Serializable { | |||
| 		String ask = item.getAttribute("ask"); | ||||
| 		String subscription = item.getAttribute("subscription"); | ||||
| 
 | ||||
| 		if (subscription!=null) { | ||||
| 		if (subscription != null) { | ||||
| 			if (subscription.equals("to")) { | ||||
| 				this.resetSubscriptionOption(Contact.Subscription.FROM); | ||||
| 				this.setSubscriptionOption(Contact.Subscription.TO); | ||||
|  | @ -275,14 +278,13 @@ public class Contact extends AbstractEntity implements Serializable { | |||
| 			} | ||||
| 		} | ||||
| 
 | ||||
| 		if ((ask!=null)&&(ask.equals("subscribe"))) { | ||||
| 		if ((ask != null) && (ask.equals("subscribe"))) { | ||||
| 			this.setSubscriptionOption(Contact.Subscription.ASKING); | ||||
| 		} else { | ||||
| 			this.resetSubscriptionOption(Contact.Subscription.ASKING); | ||||
| 		} | ||||
| 	} | ||||
| 
 | ||||
| 	 | ||||
| 	public class Subscription { | ||||
| 		public static final int TO = 0; | ||||
| 		public static final int FROM = 1; | ||||
|  | @ -290,7 +292,6 @@ public class Contact extends AbstractEntity implements Serializable { | |||
| 		public static final int PREEMPTIVE_GRANT = 4; | ||||
| 	} | ||||
| 
 | ||||
| 
 | ||||
| 	public void flagAsNotInRoster() { | ||||
| 		this.inRoster = false; | ||||
| 	} | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	 Daniel Gultsch
						Daniel Gultsch