Include bullet in length calculation

This commit is contained in:
Pieter Vander Vennet 2023-01-27 14:04:26 +01:00
parent 750c76c80e
commit 5df7246db6

View file

@ -289,10 +289,10 @@ export class Postbuilder {
continue
}
const overview = await this.createOverviewForContributor(uid, changesetsMade)
if (overview.length + toSend.join("\n").length > 500) {
if (("- " + overview).length + toSend.join("\n").length > 500) {
break
}
toSend.push(" - " + overview)
toSend.push("- " + overview)
} catch (e) {
console.error("Could not add contributor " + uid, e)
}
@ -337,7 +337,7 @@ export class Postbuilder {
const images = await imageUploader.attemptToUpload(4)
const authors = Array.from(new Set(imageUploader.getCurrentAuthors()))
if(authors.length > 0){
if (authors.length > 0) {
await this._poster.writeMessage([
"In total, " + totalImageContributorCount + " different contributors uploaded " + totalImagesCreated + " images.\n",
"Images in this thread are randomly selected from them and were made by: ",