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 MUCListTab not joining selected MUCs (#3553)
|
||||
- Fix /color completion (Thanks eijebong)
|
||||
- /info: Don't display comma before status message if not available
|
||||
|
||||
## Plugins
|
||||
|
||||
|
|
|
@ -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"),
|
||||
|
|
Loading…
Reference in a new issue