Add debug info in log

This commit is contained in:
Pieter Vander Vennet 2024-07-08 13:50:33 +02:00
parent 8796a589e8
commit ddd8566efc

View file

@ -90,7 +90,7 @@ export default class MastodonPoster {
${text.split("\n").map(txt => " > " + txt).join("\n")}`) ${text.split("\n").map(txt => " > " + txt).join("\n")}`)
return {id: "some_id"} return {id: "some_id"}
} }
console.log("Uploading message", text.substring(0, 25) + "...", `(length ${text.length}, link23: ${MastodonPoster.length23(text)})`) console.log("Uploading message ("+(options.mediaIds?.length ?? "no"),"attachments):\n", text.substring(0, 25) + "...", `(length ${text.length}, link23: ${MastodonPoster.length23(text)})`)
console.log(text.split("\n").map(txt => " > " + txt).join("\n")) console.log(text.split("\n").map(txt => " > " + txt).join("\n"))
const statusUpdate = await this.instance.v1.statuses.create({ const statusUpdate = await this.instance.v1.statuses.create({
visibility: 'public', visibility: 'public',