notes: fix delivery of multiples notes

This commit is contained in:
dece 2020-10-12 19:09:55 +02:00
parent e51ca46bdb
commit b87487deea

View file

@ -22,7 +22,8 @@ class NotesPlugin(Plugin):
if nick == self.bot.nick: if nick == self.bot.nick:
return return
notes = self.get_storage_value("notes", []) notes = self.get_storage_value("notes", [])
notes = filter(lambda n: n["dest"] == nick, notes) notes = list(filter(lambda n: n["dest"] == nick, notes))
self.bot.log_d(f"Delivering {len(notes)} notes to {nick}.")
for note in notes: for note in notes:
message = self.config["deliver_format"].format( message = self.config["deliver_format"].format(
sender=note["sender"], sender=note["sender"],