remove subject from delta chat messsages
This commit is contained in:
parent
839c9a52ef
commit
8b1c630d83
1 changed files with 9 additions and 2 deletions
|
@ -62,11 +62,18 @@ def parse(data, pnut, mstdn):
|
|||
msg.append(line)
|
||||
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:
|
||||
post_pnut(data['Subject'], body, attachments)
|
||||
post_pnut(subject, body, attachments)
|
||||
|
||||
if mstdn:
|
||||
post_mastodon(data['Subject'], body, attachments)
|
||||
post_mastodon(subject, body, attachments)
|
||||
|
||||
def post_pnut(title, text, attachments):
|
||||
post = {'text': text, 'raw': []}
|
||||
|
|
Loading…
Reference in a new issue