Stop adding from_mmcli in sent messages

This commit is contained in:
Midgard 2023-10-29 19:24:05 +01:00
parent e1468bfdd0
commit 810a9d99cb
Signed by: midgard
GPG key ID: 511C112F1331BBB4

View file

@ -414,11 +414,11 @@ def send(mm_api: mattermost.MMApi, cmdline_args):
print(f"Illegal message, missing channel: {line.strip()}", file=sys.stderr)
raise ValueError("Illegal message, missing channel")
sent = mm_api.create_post(channel_id, msg["message"], props={"from_mmcli": "true"}, filepaths=msg.get("attachments", msg.get("attachments")), root_id=msg.get("thread", msg.get("root_id")))
sent = mm_api.create_post(channel_id, msg["message"], filepaths=msg.get("attachments", msg.get("attachments")), root_id=msg.get("thread", msg.get("root_id")))
print(sent)
else:
sent = mm_api.create_post(channel["id"], cmdline_args.message, props={"from_mmcli": "true"}, filepaths=cmdline_args.attach, root_id=cmdline_args.thread)
sent = mm_api.create_post(channel["id"], cmdline_args.message, filepaths=cmdline_args.attach, root_id=cmdline_args.thread)
print(sent)