use otr encrypiton instead of plain when contact has exactly one online presence and an otr fingerprint
This commit is contained in:
		
							parent
							
								
									e0b759340d
								
							
						
					
					
						commit
						a30bc8a3e2
					
				| @ -335,6 +335,16 @@ public class Conversation extends AbstractEntity { | ||||
| 		if ((latestEncryption == Message.ENCRYPTION_DECRYPTED) | ||||
| 				|| (latestEncryption == Message.ENCRYPTION_DECRYPTION_FAILED)) { | ||||
| 			return Message.ENCRYPTION_PGP; | ||||
| 		} else if (latestEncryption == Message.ENCRYPTION_NONE) { | ||||
| 			if (getContact().getPresences().size() == 1) { | ||||
| 				if (getContact().getOtrFingerprints().size() >= 1) { | ||||
| 					return Message.ENCRYPTION_OTR; | ||||
| 				} else { | ||||
| 					return latestEncryption; | ||||
| 				} | ||||
| 			} else { | ||||
| 				return latestEncryption; | ||||
| 			} | ||||
| 		} else { | ||||
| 			return latestEncryption; | ||||
| 		} | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Daniel Gultsch
						Daniel Gultsch