fixed textout varname

This commit is contained in:
humorhenker
2021-02-18 09:17:36 +01:00
parent 4afe51f35d
commit 0ecef4285c

View File

@@ -69,8 +69,8 @@ func (b *Btelegram) JoinChannel(channel config.ChannelInfo) error {
return nil return nil
} }
func TGGetParseMode(b *Btelegram, username string, text string) (Textout string, ParseMode string) { func TGGetParseMode(b *Btelegram, username string, text string) (textout string, ParseMode string) {
Textout = username + text textout = username + text
if b.GetString("MessageFormat") == HTMLFormat { if b.GetString("MessageFormat") == HTMLFormat {
b.Log.Debug("Using mode HTML") b.Log.Debug("Using mode HTML")
ParseMode = tgbotapi.ModeHTML ParseMode = tgbotapi.ModeHTML
@@ -85,10 +85,10 @@ func TGGetParseMode(b *Btelegram, username string, text string) (Textout string,
} }
if strings.ToLower(b.GetString("MessageFormat")) == HTMLNick { if strings.ToLower(b.GetString("MessageFormat")) == HTMLNick {
b.Log.Debug("Using mode HTML - nick only") b.Log.Debug("Using mode HTML - nick only")
Textout = username + html.EscapeString(text) textout = username + html.EscapeString(text)
ParseMode = tgbotapi.ModeHTML ParseMode = tgbotapi.ModeHTML
} }
return Textout, ParseMode return textout, ParseMode
} }
func (b *Btelegram) Send(msg config.Message) (string, error) { func (b *Btelegram) Send(msg config.Message) (string, error) {