From 6fb9a94a43021ad3e3834acb5149716c5e5f7ece Mon Sep 17 00:00:00 2001 From: Mark Qvist Date: Sun, 17 Nov 2024 12:12:26 +0100 Subject: [PATCH] Fixed stamp cost display in announce stream --- sbapp/sideband/core.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/sbapp/sideband/core.py b/sbapp/sideband/core.py index 97efab3..82d78d7 100644 --- a/sbapp/sideband/core.py +++ b/sbapp/sideband/core.py @@ -2422,12 +2422,19 @@ class SidebandCore(): try: if not entry[2] in added_dests: app_data = entry[3] + dest_type = entry[4] + if dest_type == "lxmf.delivery": + announced_name = LXMF.display_name_from_app_data(app_data) + announced_cost = self.message_router.get_outbound_stamp_cost(entry[2]) + else: + announced_name = None + announced_cost = None announce = { "dest": entry[2], - "name": LXMF.display_name_from_app_data(app_data), - "cost": LXMF.stamp_cost_from_app_data(app_data), + "name": announced_name, + "cost": announced_cost, "time": entry[1], - "type": entry[4] + "type": dest_type } added_dests.append(entry[2]) announces.append(announce)