• Maxime Buquet's avatar
    Learn about chain length: new should_heartbeat method · af33cd41
    Maxime Buquet authored
    With this commit, slixmpp-omemo now reads the ratchet chain length,
    (both receiving and sending), that we should track to know when to send
    a heartbeat message.
    This allows us to signal other devices that we are still active and
    listening. Some clients will stop encrypting to us if we haven't replied
    for a certain number of messages.
    The current 0384 spec (0.7) says we should send a heartbeat message at
    least once this number goes over 53 (fair dice roll). It doesn't say
    when a client may/should stop encrypting to us, or what it should do at
    all once we go over 53.
    Signed-off-by: Maxime Buquet's avatarMaxime “pep” Buquet <pep@bouah.net>