travelynx does not render newlines in comments
This commit is contained in:
parent
8b1046d238
commit
aedb702c38
1 changed files with 3 additions and 3 deletions
|
@ -66,9 +66,9 @@ for checkin in sorted(checkins, key=lambda c: c["createdAt"]):
|
|||
train_type = checkin["train"]["lineName"].split(" ")[0]
|
||||
comment = [f"Import from Traewelling, ID {checkin['id']}"]
|
||||
if checkin["body"]:
|
||||
comment.extend(["", checkin["body"]])
|
||||
comment.append(checkin["body"])
|
||||
if checkin["event"]:
|
||||
comment.extend(["", checkin["event"]["name"], checkin["event"]["url"]])
|
||||
comment.extend([checkin["event"]["name"], checkin["event"]["url"]])
|
||||
travelynx_data = {
|
||||
"token": TRAVELYNX_API_TOKEN,
|
||||
"dryRun": False,
|
||||
|
@ -114,7 +114,7 @@ for checkin in sorted(checkins, key=lambda c: c["createdAt"]):
|
|||
else None,
|
||||
},
|
||||
# "intermediateStops": [],
|
||||
"comment": "\n".join(comment),
|
||||
"comment": " - ".join(comment),
|
||||
}
|
||||
l.debug(json.dumps(travelynx_data))
|
||||
r = s.post(
|
||||
|
|
Loading…
Reference in a new issue