Skip to content

Commit

Permalink
Document the last two changes
Browse files Browse the repository at this point in the history
  • Loading branch information
arlolra committed Sep 7, 2014
1 parent 0b38468 commit f29d605
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,9 @@ For each user you're communicating with, instantiate an OTR object.
console.log("(optional) with sendMsg attached meta data: " + meta)
})

buddy.on('error', function (err) {
console.log("error occurred: " + err)
buddy.on('error', function (err, severity) {
if (severity === 'error') // either 'error' or 'warn'
console.error("error occurred: " + err)
})

**New message from buddy received**: Pass the received message to the `receiveMsg`
Expand Down Expand Up @@ -122,9 +123,11 @@ Another policy, `SEND_WHITESPACE_TAG`, will append tags to plaintext messages,
indicating a willingness to speak OTR. If the recipient in turn has set the
policy `WHITESPACE_START_AKE`, the AKE will be initiated.

**Close private connection**: To end an encrypted communication,
**Close private connection**: To end an encrypted communication session,

buddy.endOtr()
buddy.endOtr(function() {
// calls back when the 'disconnect' message has been sent
})

will return the message state to plaintext and notify the correspondent.

Expand Down

0 comments on commit f29d605

Please sign in to comment.