messages sent opportunistically should be set as failed on app start if they didn't successfully deliver

This commit is contained in:
liamcottle 2024-09-19 13:06:35 +12:00
commit 0161ee8757

View file

@ -96,6 +96,7 @@ class ReticulumMeshChat:
# lxmf messages in outbound or sending state should be marked as failed when app starts as they are no longer being processed
(database.LxmfMessage.update(state="failed")
.where(database.LxmfMessage.state == "outbound")
.orwhere((database.LxmfMessage.state == "sent") & (database.LxmfMessage.method == "opportunistic"))
.orwhere(database.LxmfMessage.state == "sending").execute())
# init reticulum