summaryrefslogtreecommitdiff
path: root/poezio
diff options
context:
space:
mode:
Diffstat (limited to 'poezio')
-rw-r--r--poezio/core/commands.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/poezio/core/commands.py b/poezio/core/commands.py
index 46a95d33..d07c2e1e 100644
--- a/poezio/core/commands.py
+++ b/poezio/core/commands.py
@@ -1112,12 +1112,15 @@ class CommandCore:
def invitations(self):
"""/invitations"""
build = []
- for invite in self.core.pending_invites:
+ for room, inviter in self.core.pending_invites.items():
try:
- bare = JID(self.core.pending_invites[invite]).bare
+ bare = JID(inviter).bare
except InvalidJID:
- self.core.information('Invalid JID found in /invitations: %s' % args[0], 'Error')
- build.append('%s by %s' % (invite, bare))
+ self.core.information(
+ f'Invalid JID found in /invitations: {inviter}',
+ 'Error'
+ )
+ build.append(f'{room} by {bare}')
if build:
message = 'You are invited to the following rooms:\n' + ','.join(build)
else: