hide verify snackbar when otr session is ended. fixed npe

iNPUTmice created

Change summary

src/eu/siacs/conversations/entities/Conversation.java | 3 +++
src/eu/siacs/conversations/parser/MessageParser.java  | 1 +
2 files changed, 4 insertions(+)

Detailed changes

src/eu/siacs/conversations/entities/Conversation.java 🔗

@@ -291,6 +291,9 @@ public class Conversation extends AbstractEntity {
 	public String getOtrFingerprint() {
 		if (this.otrFingerprint == null) {
 			try {
+				if (getOtrSession()== null) {
+					return "";
+				}
 				DSAPublicKey remotePubKey = (DSAPublicKey) getOtrSession()
 						.getRemotePublicKey();
 				StringBuilder builder = new StringBuilder(

src/eu/siacs/conversations/parser/MessageParser.java 🔗

@@ -80,6 +80,7 @@ public class MessageParser extends AbstractParser implements
 				mXmppConnectionService.onOtrSessionEstablished(conversation);
 			} else if ((before != after) && (after == SessionStatus.FINISHED)) {
 				conversation.resetOtrSession();
+				mXmppConnectionService.updateConversationUi();
 			}
 			if ((body == null) || (body.isEmpty())) {
 				return null;