mirror of
https://github.com/markqvist/Sideband.git
synced 2025-07-13 01:59:36 -04:00
Fixed stamp cost display in announce stream
This commit is contained in:
parent
46450098b4
commit
6fb9a94a43
1 changed files with 10 additions and 3 deletions
|
@ -2422,12 +2422,19 @@ class SidebandCore():
|
||||||
try:
|
try:
|
||||||
if not entry[2] in added_dests:
|
if not entry[2] in added_dests:
|
||||||
app_data = entry[3]
|
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 = {
|
announce = {
|
||||||
"dest": entry[2],
|
"dest": entry[2],
|
||||||
"name": LXMF.display_name_from_app_data(app_data),
|
"name": announced_name,
|
||||||
"cost": LXMF.stamp_cost_from_app_data(app_data),
|
"cost": announced_cost,
|
||||||
"time": entry[1],
|
"time": entry[1],
|
||||||
"type": entry[4]
|
"type": dest_type
|
||||||
}
|
}
|
||||||
added_dests.append(entry[2])
|
added_dests.append(entry[2])
|
||||||
announces.append(announce)
|
announces.append(announce)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue