mirror of
https://github.com/moparisthebest/Conversations
synced 2024-11-28 19:52:15 -05:00
always show verify fingerprint if there is an active otr session
This commit is contained in:
parent
7dcce220cb
commit
161623eca2
@ -569,7 +569,7 @@ public class ConversationFragment extends Fragment {
|
|||||||
this.messageListAdapter.notifyDataSetChanged();
|
this.messageListAdapter.notifyDataSetChanged();
|
||||||
if (conversation.getMode() == Conversation.MODE_SINGLE) {
|
if (conversation.getMode() == Conversation.MODE_SINGLE) {
|
||||||
if (messageList.size() >= 1) {
|
if (messageList.size() >= 1) {
|
||||||
makeFingerprintWarning(conversation.getLatestEncryption());
|
makeFingerprintWarning();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!conversation.getMucOptions().online()
|
if (!conversation.getMucOptions().online()
|
||||||
@ -721,14 +721,13 @@ public class ConversationFragment extends Fragment {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void makeFingerprintWarning(int latestEncryption) {
|
protected void makeFingerprintWarning() {
|
||||||
Set<String> knownFingerprints = conversation.getContact()
|
Set<String> knownFingerprints = conversation.getContact()
|
||||||
.getOtrFingerprints();
|
.getOtrFingerprints();
|
||||||
if ((latestEncryption == Message.ENCRYPTION_OTR)
|
if (conversation.hasValidOtrSession()
|
||||||
&& (conversation.hasValidOtrSession()
|
|
||||||
&& (!conversation.isMuted())
|
&& (!conversation.isMuted())
|
||||||
&& (conversation.getOtrSession().getSessionStatus() == SessionStatus.ENCRYPTED) && (!knownFingerprints
|
&& (conversation.getOtrSession().getSessionStatus() == SessionStatus.ENCRYPTED) && (!knownFingerprints
|
||||||
.contains(conversation.getOtrFingerprint())))) {
|
.contains(conversation.getOtrFingerprint()))) {
|
||||||
showSnackbar(R.string.unknown_otr_fingerprint, R.string.verify,
|
showSnackbar(R.string.unknown_otr_fingerprint, R.string.verify,
|
||||||
new OnClickListener() {
|
new OnClickListener() {
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user