Switched to `flag()`
This commit is contained in:
shamoon 2022-03-02 09:39:04 -08:00 committed by GitHub
commit 038dc21c78
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 6 deletions

View File

@ -44,7 +44,7 @@ class MarkReadMailAction(BaseMailAction):
return {"seen": False}
def post_consume(self, M, message_uids, parameter):
M.seen(message_uids, True)
M.flag(message_uids, [MailMessageFlags.SEEN], True)
class MoveMailAction(BaseMailAction):

View File

@ -68,11 +68,6 @@ class BogusMailBox(ContextManager):
return list(msg)
def seen(self, uid_list, seen_val):
for message in self.messages:
if message.uid in uid_list:
message.seen = seen_val
def delete(self, uid_list):
self.messages = list(filter(lambda m: m.uid not in uid_list, self.messages))
@ -82,6 +77,8 @@ class BogusMailBox(ContextManager):
for flag in flag_set:
if flag == MailMessageFlags.FLAGGED:
message.flagged = value
if flag == MailMessageFlags.SEEN:
message.seen = value
def move(self, uid_list, folder):
if folder == "spam":