src/client.js
/**
 * Decrypt a received event according to the algorithm specified in the event.
 *
 * @param {MatrixClient} client
 * @param {MatrixEvent} event
 */
Decrypt a received event according to the algorithm specified in the event.
Decrypt a received event according to the algorithm specified in the event .
function _decryptEvent(client, event) {
    if (!client._crypto) {
        _badEncryptedMessage(event, "Encryption not enabled");
        return;
    }
    try {
        client._crypto.decryptEvent(event);
    } catch (e) {
        if (!(e instanceof Crypto.DecryptionError)) {
            throw e;
        }
        _badEncryptedMessage(event, e.message);
        return;
    }
}
function _decryptEvent ( client , event ) { if ( ! client . _crypto ) { _badEncryptedMessage ( event , "Encryption not enabled" ) ; return ; } try { client . _crypto . decryptEvent ( event ) ; } catch ( e ) { if ( ! ( e instanceof Crypto . DecryptionError ) ) { throw e ; } _badEncryptedMessage ( event , e . message ) ; return ; } }
Decrypt a received event according to the algorithm specified in the event.
Decrypt a received event according to the algorithm specified in the event .