ConversationTab: don't display comma in /info if no status
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
parent
2005ed6ae0
commit
12af2c5e47
2 changed files with 4 additions and 10 deletions
|
@ -72,6 +72,7 @@ This file describes the new features in each poezio release.
|
||||||
- Fix default dataform field handling (#3554)
|
- Fix default dataform field handling (#3554)
|
||||||
- Fix MUCListTab not joining selected MUCs (#3553)
|
- Fix MUCListTab not joining selected MUCs (#3553)
|
||||||
- Fix /color completion (Thanks eijebong)
|
- Fix /color completion (Thanks eijebong)
|
||||||
|
- /info: Don't display comma before status message if not available
|
||||||
|
|
||||||
## Plugins
|
## Plugins
|
||||||
|
|
||||||
|
|
|
@ -277,16 +277,9 @@ class ConversationTab(OneToOneTab):
|
||||||
else:
|
else:
|
||||||
resource = None
|
resource = None
|
||||||
if resource:
|
if resource:
|
||||||
status = (
|
status = (f', Status: {resource.status}') if resource.status else ''
|
||||||
'Status: %s' % resource.status) if resource.status else ''
|
show = f"Show: {resource.presence or 'available'}"
|
||||||
self.add_message(
|
self.add_message(InfoMessage(f'{show}{status}'))
|
||||||
InfoMessage(
|
|
||||||
"Show: %(show)s, %(status)s" % {
|
|
||||||
'show': resource.presence or 'available',
|
|
||||||
'status': status,
|
|
||||||
}
|
|
||||||
),
|
|
||||||
)
|
|
||||||
return True
|
return True
|
||||||
self.add_message(
|
self.add_message(
|
||||||
InfoMessage("No information available"),
|
InfoMessage("No information available"),
|
||||||
|
|
Loading…
Reference in a new issue