From 5d0b15f7f78265a62f54ab4a9552c6d4b3991560 Mon Sep 17 00:00:00 2001 From: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com> Date: Wed, 17 Jul 2019 22:22:00 +0100 Subject: [PATCH] Remove command prefix from reconnect prompt (#81) --- user.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/user.go b/user.go index 8a31835..4da90da 100644 --- a/user.go +++ b/user.go @@ -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 }