Remove command prefix from reconnect prompt (#81)

This commit is contained in:
Andrew Morgan 2019-07-17 22:22:00 +01:00 committed by Tulir Asokan
parent 35e28feb7c
commit 5d0b15f7f7

View file

@ -183,8 +183,8 @@ func (user *User) Connect(evenIfNoSession bool) bool {
conn, err := whatsapp.NewConn(timeout * time.Second)
if err != nil {
user.log.Errorln("Failed to connect to WhatsApp:", err)
msg := format.RenderMarkdown(fmt.Sprintf("\u26a0 Failed to connect to WhatsApp server. " +
"This indicates a network problem on the bridge server. See bridge logs for more info."))
msg := format.RenderMarkdown("\u26a0 Failed to connect to WhatsApp server. "+
"This indicates a network problem on the bridge server. See bridge logs for more info.")
_, _ = user.bridge.Bot.SendMessageEvent(user.ManagementRoom, mautrix.EventMessage, msg)
return false
}
@ -202,9 +202,8 @@ func (user *User) RestoreSession() bool {
return true
} else if err != nil {
user.log.Errorln("Failed to restore session:", err)
msg := format.RenderMarkdown(fmt.Sprintf("\u26a0 Failed to connect to WhatsApp. Make sure WhatsApp "+
"on your phone is reachable and use `%s reconnect` to try connecting again.",
user.bridge.Config.Bridge.CommandPrefix))
msg := format.RenderMarkdown("\u26a0 Failed to connect to WhatsApp. Make sure WhatsApp "+
"on your phone is reachable and use `reconnect` to try connecting again.")
_, _ = user.bridge.Bot.SendMessageEvent(user.ManagementRoom, mautrix.EventMessage, msg)
return false
}