Class: OlmEncryption

crypto/algorithms/olm~OlmEncryption

new OlmEncryption(params)

Olm encryption implementation
Parameters:
Name Type Description
params object parameters, as per module:crypto/algorithms/base.EncryptionAlgorithm
Source:

Extends

Methods

encryptMessage(room, eventType, plaintext) → {module:client.Promise}

Encrypt a message event
Parameters:
Name Type Description
room module:models/room
eventType string
plaintext object event content
Overrides:
Source:
Returns:
Promise which resolves to the new event body
Type
module:client.Promise

onNewDevice(userId, deviceId)

Called when a new device announces itself in the room
Parameters:
Name Type Description
userId string owner of the device
deviceId string deviceId of the device
Inherited From:
Source:

onRoomMembership(event, member, oldMembershipopt)

Called when the membership of a member of the room changes.
Parameters:
Name Type Attributes Description
event module:models/event.MatrixEvent event causing the change
member module:models/room-member user whose membership changed
oldMembership string <optional>
previous membership
Inherited From:
Source: