diff --git a/mods/mastodon.go b/mods/mastodon.go index bd8e409..fcd20a9 100644 --- a/mods/mastodon.go +++ b/mods/mastodon.go @@ -69,12 +69,12 @@ func mastodon_message(broker *tg.Broker, update tg.APIMessage) { update.Text = update.ReplyTo.Text if update.ReplyTo.Photo != nil { update.Photo = update.ReplyTo.Photo - update.Caption = update.Text + update.Caption = update.ReplyTo.Caption } } // Check for media - if update.Photo != nil && update.Caption != nil { + if update.Photo != nil { maxsz := 0 photo := tg.APIPhotoSize{} for _, curphoto := range update.Photo { @@ -83,7 +83,7 @@ func mastodon_message(broker *tg.Broker, update tg.APIMessage) { photo = curphoto } } - go broker.GetFile(photo.FileID, func(broker *tg.Broker, data tg.BrokerUpdate) { + broker.GetFile(photo.FileID, func(broker *tg.Broker, data tg.BrokerUpdate) { if data.Type == tg.BError { log.Printf("[mastodon] Received error from broker: %s\n", *data.Error) broker.SendTextMessage(update.Chat, "ERRORE! @hamcha controlla la console!", &tg.MessageOptions{