improved handshake check in armored chat example