diff options
author | Jannis M. Hoffmann <jannis@fehcom.de> | 2024-03-14 22:50:38 +0100 |
---|---|---|
committer | Jannis M. Hoffmann <jannis@fehcom.de> | 2024-03-14 22:50:38 +0100 |
commit | 59af8165dd3b4fe2453ae4e88a57d0711db5b373 (patch) | |
tree | 168cc7d6ff6dff0a96abce6279f53817d3a752ee | |
parent | bb003d1fd75eb1cfcb8863a2474705acee342d66 (diff) |
mark read mails as such and correctly add root folder
-rwxr-xr-x | script/extract.py | 2 | ||||
-rw-r--r-- | src/jwebmail/__init__.py | 2 | ||||
-rw-r--r-- | src/jwebmail/model/read_mails.py | 5 |
3 files changed, 4 insertions, 5 deletions
diff --git a/script/extract.py b/script/extract.py index 5bbbec8..9cd810b 100755 --- a/script/extract.py +++ b/script/extract.py @@ -314,6 +314,8 @@ def read_mail(f, req): if not msg: raise QMAuthError("no such message", mid=r.mid) + msg.add_flag('S') + res = jwebmail.Mail( head=_get_head_info(msg), body=_get_body(msg), diff --git a/src/jwebmail/__init__.py b/src/jwebmail/__init__.py index e3c778d..b1dd7f3 100644 --- a/src/jwebmail/__init__.py +++ b/src/jwebmail/__init__.py @@ -34,7 +34,7 @@ else: toml_read_file = dict(load=toml_load, text=True) -__version__ = "2.2.0.dev0" +__version__ = "2.2.0.dev1" def validate_config(app): diff --git a/src/jwebmail/model/read_mails.py b/src/jwebmail/model/read_mails.py index 8ba3c67..e9b6800 100644 --- a/src/jwebmail/model/read_mails.py +++ b/src/jwebmail/model/read_mails.py @@ -99,10 +99,7 @@ class QMailAuthuser: resp = self.build_and_run("folders", pb2.FoldersReq().SerializeToString()) result = pb2.FoldersResp() result.ParseFromString(resp) - res = result.folders - if isinstance(res, list): - return [""] + res - return res + return list(result.folders) + [""] def move(self, mid, from_f, to_f): req = pb2.MoveReq(mid=mid, from_f=from_f, to_f=to_f) |