feat: capture mail bodies in linked Wiki pages
Test and release pages-cli / linux (push) Successful in 31s
Test and release pages-cli / macos (push) Skipped

This commit is contained in:
Anya Tokugawa committed 2026-11-06 08:33:54 +09:00
1 parent 59ab4c5b26
commit cde94ed936
8 files changed
+101 -24

No files matched your search

+3 -1
View File
@@ -19,7 +19,9 @@ class Handler(BaseHTTPRequestHandler):
elif self.path=='/_/auth/logout':self.reply({})
elif self.path=='/_/api/v1/extension/organizer.tasks/capture':
if self.headers.get('Authorization')!='Bearer '+token:self.send_error(401);return
self.reply({'item':json.loads(body)})
item=json.loads(body)
if item.get('wiki_body') != 'Message-ID: <smoke@example.invalid>\n\nPRIVATE BODY':self.send_error(422);return
item.pop('wiki_body');self.reply({'item':item,'page_path':'/private/mail/synthetic'})
else:self.send_error(404)
def do_GET(self):
if self.headers.get('Authorization')!='Bearer '+token:self.send_error(401);return