OmemoState¶
-
class
omemo.state.
OmemoState
(own_jid, connection)[source]¶ -
__init__
(own_jid, connection)[source]¶ Instantiates an OmemoState object.
Parameters: connection – an sqlite3.Connection
-
__module__
= 'omemo.state'¶
-
bundle
¶ .. highlight – python Returns all data needed to announce bundle information.
bundle_dict = { 'signedPreKeyPublic': bytes, 'prekeys': [(int, bytes) (int, bytes)], 'identityKey': bytes, 'signedPreKeyId': int, 'signedPreKeySignature': bytes }
-
device_list_for
(jid)[source]¶ Return a list of known device ids for the specified jid.
Parameters: jid (string) – The contacts jid
-
devices_without_sessions
(jid)[source]¶ List device_ids for the given jid which have no axolotl session.
Parameters: jid (string) – The contacts jid Returns: [int] – A list of device_ids
-
own_device_id
¶
-
own_device_id_published
()[source]¶ Return True only if own device id was added via :py:method:`OmemoState.set_own_devices()`.
-
own_devices_without_sessions
(own_jid)[source]¶ List own device_ids which have no axolotl session.
Parameters: own_jid (string) – Workaround for missing own jid in OmemoState Returns: [int] – A list of device_ids
-
set_devices
(name, devices)[source]¶ Return a an.
Parameters: - jid (string) – The contacts jid
- devices ([int]) – A list of devices
-
set_own_devices
(devices)[source]¶ Overwrite the current :py:attribute:`OmemoState.own_devices` with the given devices.
Parameters: devices ([int]) – A list of device_ids
-