Skip to content

Commit

Permalink
bugfixes revealed during testing, working now
Browse files Browse the repository at this point in the history
  • Loading branch information
fasiha committed Dec 29, 2022
1 parent a78a72e commit 3f6fddb
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions js/bot.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ function sendPrivateStatus (inReplyToId, username, reblog) {
}

function doesMessageHaveUnCaptionedImages(message) {
if (message.data.reblog) {
return doesMessageHaveUnCaptionedImages(message.data.reblog)
if (message.reblog) {
return doesMessageHaveUnCaptionedImages(message.reblog)
}

const mediaAttachments = message.data.media_attachments
const mediaAttachments = message.media_attachments
const hasMediaAttachments = mediaAttachments.length > 0

if (!hasMediaAttachments) {
Expand Down Expand Up @@ -141,7 +141,7 @@ function sendMessagesToTimeline() {
if (message.event === 'update') {
console.info('Message ID: ', message.data.id)

if (!doesMessageHaveUnCaptionedImages(message)) {
if (!doesMessageHaveUnCaptionedImages(message.data)) {
return
}

Expand Down
2 changes: 1 addition & 1 deletion js/mastodon.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ function deleteStatus (id) {
}

function followUser (accountId) {
return mastodonClient.post(`accounts/${accountId}/follow`, { reblogs: false })
return mastodonClient.post(`accounts/${accountId}/follow`, { reblogs: true })
.then(resp => resp.data.id)
}

Expand Down
4 changes: 2 additions & 2 deletions js/reblogGrammar.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
"📷", "📸", "🤳", "🎥", "📹", "♻️", "🆙", "👆", "☝️", "", "", "", "", ""
],
"words": [
"Oops, you boosted something without media captions!"
"Oops, you boosted something without media captions!",
"Hey, your boosted toot's media don't all have descriptions!",
"Psst, you boosted something that's missing descriptions",
"Your boosted toot's media doesn't have descriptions, just so you know!",
"Blind and/or partially sighted people may have trouble with the toot you boosted",
"It makes Mastodon more accessible when media have captions. This boost doesn't.",
"It makes Mastodon more accessible when media have captions. This boost doesn't."
],
"deleteredraft": [
"The author can delete and re-draft. Or, edit, remove and re-add media, and add captions.",
Expand Down

0 comments on commit 3f6fddb

Please sign in to comment.