diff options
Diffstat (limited to 'plugins/tg.go')
-rw-r--r-- | plugins/tg.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/tg.go b/plugins/tg.go index ccd3a9b..416d4db 100644 --- a/plugins/tg.go +++ b/plugins/tg.go @@ -8,6 +8,7 @@ import ( "log" "net/http" "os" + "strings" tgbotapi "github.com/go-telegram-bot-api/telegram-bot-api" "github.com/neonxp/tamtam" @@ -80,7 +81,7 @@ func (t *Telegram) Run(ctx context.Context) error { for _, a := range msg.Images { att = append(att, tamtam.Image{Url: a}) } - text := fmt.Sprintf("*%s*:\n%s", msg.From, msg.Text) + text := fmt.Sprintf("*%s*:\n%s", strings.Trim(msg.From, " "), msg.Text) if len(msg.Text) > 0 { res, err := t.API.Send(tgbotapi.MessageConfig{ BaseChat: tgbotapi.BaseChat{ |