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]
|
train_type = checkin["train"]["lineName"].split(" ")[0]
|
||||||
comment = [f"Import from Traewelling, ID {checkin['id']}"]
|
comment = [f"Import from Traewelling, ID {checkin['id']}"]
|
||||||
if checkin["body"]:
|
if checkin["body"]:
|
||||||
comment.extend(["", checkin["body"]])
|
comment.append(checkin["body"])
|
||||||
if checkin["event"]:
|
if checkin["event"]:
|
||||||
comment.extend(["", checkin["event"]["name"], checkin["event"]["url"]])
|
comment.extend([checkin["event"]["name"], checkin["event"]["url"]])
|
||||||
travelynx_data = {
|
travelynx_data = {
|
||||||
"token": TRAVELYNX_API_TOKEN,
|
"token": TRAVELYNX_API_TOKEN,
|
||||||
"dryRun": False,
|
"dryRun": False,
|
||||||
|
@ -114,7 +114,7 @@ for checkin in sorted(checkins, key=lambda c: c["createdAt"]):
|
||||||
else None,
|
else None,
|
||||||
},
|
},
|
||||||
# "intermediateStops": [],
|
# "intermediateStops": [],
|
||||||
"comment": "\n".join(comment),
|
"comment": " - ".join(comment),
|
||||||
}
|
}
|
||||||
l.debug(json.dumps(travelynx_data))
|
l.debug(json.dumps(travelynx_data))
|
||||||
r = s.post(
|
r = s.post(
|
||||||
|
|
Loading…
Reference in a new issue