Skip to content

Commit

Permalink
feat: mark otr session as verified in ui
Browse files Browse the repository at this point in the history
  • Loading branch information
sualko committed Feb 5, 2019
1 parent c4aa908 commit 1b94fc4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/plugins/otr/Session.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Log from '../../util/Log'
import Contact from '../../Contact'
import { IContact } from '@src/Contact.interface';
import Message from '../../Message'
import { DIRECTION } from '../../Message.interface'
import Translation from '../../util/Translation'
Expand All @@ -9,6 +9,7 @@ import { EncryptionState } from '../../plugin/AbstractPlugin'
import Storage from '../../Storage'
import { IConnection } from '../../connection/Connection.interface'
import PersistentMap from '../../util/PersistentMap'
import OTRPlugin from './Plugin';

//@REVIEW
interface OTR {
Expand Down Expand Up @@ -36,7 +37,7 @@ export default class Session {

private ourPayloadId;

constructor(private peer: Contact, key: DSA, private storage: Storage, private connection: IConnection) {
constructor(private peer: IContact, key: DSA, private storage: Storage, private connection: IConnection) {

let options: any = {
priv: key,
Expand Down Expand Up @@ -221,7 +222,7 @@ export default class Session {
case 'trust': // verification completed
this.session.trust = result;

//@TODO mark as verified
this.peer.setEncryptionState(EncryptionState.VerifiedEncrypted, OTRPlugin.getName());
this.saveSession();

if (result) {
Expand Down

0 comments on commit 1b94fc4

Please sign in to comment.