mirror of
https://github.com/liberatedsystems/openCom-Companion.git
synced 2024-11-22 13:30:36 +01:00
Send messages opportunistically if ratchets are available
This commit is contained in:
parent
f8b3e3760b
commit
2ecdf1c853
@ -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 = {}
|
||||
|
@ -102,7 +102,6 @@ class Messages():
|
||||
self.list.remove_widget(self.load_more_button)
|
||||
|
||||
def message_details_dialog(self, lxm_hash):
|
||||
RNS.log(f"Opening dialog for {RNS.prettyhexrep(lxm_hash)}", RNS.LOG_DEBUG)
|
||||
ss = int(dp(16))
|
||||
ms = int(dp(14))
|
||||
|
||||
@ -247,10 +246,10 @@ class Messages():
|
||||
else:
|
||||
w.line_color = (1.0, 1.0, 1.0, 0.5)
|
||||
|
||||
if m["state"] == LXMF.LXMessage.SENDING or m["state"] == LXMF.LXMessage.OUTBOUND:
|
||||
if m["state"] == LXMF.LXMessage.SENDING or m["state"] == LXMF.LXMessage.OUTBOUND or m["state"] == LXMF.LXMessage.SENT:
|
||||
msg = self.app.sideband.message(m["hash"])
|
||||
|
||||
if msg["state"] == LXMF.LXMessage.OUTBOUND or msg["state"] == LXMF.LXMessage.SENDING:
|
||||
if msg["state"] == LXMF.LXMessage.OUTBOUND or msg["state"] == LXMF.LXMessage.SENDING or msg["state"] == LXMF.LXMessage.SENT:
|
||||
w.md_bg_color = msg_color = mdc(color_unknown, intensity_msgs)
|
||||
txstr = time.strftime(ts_format, time.localtime(msg["sent"]))
|
||||
titlestr = ""
|
||||
|
Loading…
Reference in New Issue
Block a user