remove subject from delta chat messsages

This commit is contained in:
Morgan McMillian 2021-11-12 07:38:12 -08:00
parent 839c9a52ef
commit 8b1c630d83

View file

@ -62,11 +62,18 @@ def parse(data, pnut, mstdn):
msg.append(line) msg.append(line)
body = '\n'.join(msg) body = '\n'.join(msg)
deltac = data.get('Chat-Version')
if deltac is None:
subject = data['Subject']
else:
logger.debug(f"Chat-Version: {deltac}")
subject = ""
if pnut: if pnut:
post_pnut(data['Subject'], body, attachments) post_pnut(subject, body, attachments)
if mstdn: if mstdn:
post_mastodon(data['Subject'], body, attachments) post_mastodon(subject, body, attachments)
def post_pnut(title, text, attachments): def post_pnut(title, text, attachments):
post = {'text': text, 'raw': []} post = {'text': text, 'raw': []}