mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-02 13:45:10 -05:00
Merge pull request #199 from jschpp/fix-upstream#1672
Switched to `flag()`
This commit is contained in:
commit
038dc21c78
@ -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):
|
||||
|
@ -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":
|
||||
|
Loading…
x
Reference in New Issue
Block a user