feat: capture mail bodies in linked Wiki pages
This commit is contained in:
1 parent
59ab4c5b26
commit
cde94ed936
8 files changed
+101
-24
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user