guardianproject/Gibberbot — comment on commit 5ccdc603eef19c1a30697fe40923402137e3bcd0
File: src/info/guardianproject/otr/OtrChatManager.java line 261
By devrandom:

That should work, as long as those are all the states and we can't get to ENCRYPTED twice without going through those states in-between. Not that familiar with the API.