summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxime “pep” Buquet <pep@bouah.net>2022-03-31 12:12:48 +0200
committerMaxime Buquet <pep@bouah.net>2022-04-05 18:18:40 +0200
commit12af2c5e47893c190926c13d83c6bfc6972390f6 (patch)
treee9d188593f97fe2f44572821f7ebf127729b8d80
parent2005ed6ae01016e5958f4efaac2a4c522367141f (diff)
downloadpoezio-12af2c5e47893c190926c13d83c6bfc6972390f6.tar.gz
poezio-12af2c5e47893c190926c13d83c6bfc6972390f6.tar.bz2
poezio-12af2c5e47893c190926c13d83c6bfc6972390f6.tar.xz
poezio-12af2c5e47893c190926c13d83c6bfc6972390f6.zip
ConversationTab: don't display comma in /info if no status
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
-rw-r--r--CHANGELOG1
-rw-r--r--poezio/tabs/conversationtab.py13
2 files changed, 4 insertions, 10 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 7f1265b4..6180d63e 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -72,6 +72,7 @@ This file describes the new features in each poezio release.
- Fix default dataform field handling (#3554)
- Fix MUCListTab not joining selected MUCs (#3553)
- Fix /color completion (Thanks eijebong)
+- /info: Don't display comma before status message if not available
## Plugins
diff --git a/poezio/tabs/conversationtab.py b/poezio/tabs/conversationtab.py
index d3a1640c..f07e7b0e 100644
--- a/poezio/tabs/conversationtab.py
+++ b/poezio/tabs/conversationtab.py
@@ -277,16 +277,9 @@ class ConversationTab(OneToOneTab):
else:
resource = None
if resource:
- status = (
- 'Status: %s' % resource.status) if resource.status else ''
- self.add_message(
- InfoMessage(
- "Show: %(show)s, %(status)s" % {
- 'show': resource.presence or 'available',
- 'status': status,
- }
- ),
- )
+ status = (f', Status: {resource.status}') if resource.status else ''
+ show = f"Show: {resource.presence or 'available'}"
+ self.add_message(InfoMessage(f'{show}{status}'))
return True
self.add_message(
InfoMessage("No information available"),