mirror of
https://github.com/markqvist/Sideband.git
synced 2025-11-29 19:56:39 -05:00
Send messages opportunistically if ratchets are available
This commit is contained in:
parent
f8b3e3760b
commit
2ecdf1c853
2 changed files with 7 additions and 4 deletions
|
|
@ -4067,7 +4067,11 @@ class SidebandCore():
|
|||
if propagation:
|
||||
desired_method = LXMF.LXMessage.PROPAGATED
|
||||
else:
|
||||
desired_method = LXMF.LXMessage.DIRECT
|
||||
if not self.message_router.delivery_link_available(destination_hash) and RNS.Identity.current_ratchet_id(destination_hash) != None:
|
||||
RNS.log(f"Have ratchet for {RNS.prettyhexrep(destination_hash)}, requesting opportunistic delivery of message", RNS.LOG_DEBUG)
|
||||
desired_method = LXMF.LXMessage.OPPORTUNISTIC
|
||||
else:
|
||||
desired_method = LXMF.LXMessage.DIRECT
|
||||
|
||||
if skip_fields:
|
||||
fields = {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue