Remove command prefix from reconnect prompt (#81)
This commit is contained in:
parent
35e28feb7c
commit
5d0b15f7f7
1 changed files with 4 additions and 5 deletions
9
user.go
9
user.go
|
@ -183,8 +183,8 @@ func (user *User) Connect(evenIfNoSession bool) bool {
|
||||||
conn, err := whatsapp.NewConn(timeout * time.Second)
|
conn, err := whatsapp.NewConn(timeout * time.Second)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
user.log.Errorln("Failed to connect to WhatsApp:", err)
|
user.log.Errorln("Failed to connect to WhatsApp:", err)
|
||||||
msg := format.RenderMarkdown(fmt.Sprintf("\u26a0 Failed to connect to WhatsApp server. " +
|
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."))
|
"This indicates a network problem on the bridge server. See bridge logs for more info.")
|
||||||
_, _ = user.bridge.Bot.SendMessageEvent(user.ManagementRoom, mautrix.EventMessage, msg)
|
_, _ = user.bridge.Bot.SendMessageEvent(user.ManagementRoom, mautrix.EventMessage, msg)
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
@ -202,9 +202,8 @@ func (user *User) RestoreSession() bool {
|
||||||
return true
|
return true
|
||||||
} else if err != nil {
|
} else if err != nil {
|
||||||
user.log.Errorln("Failed to restore session:", err)
|
user.log.Errorln("Failed to restore session:", err)
|
||||||
msg := format.RenderMarkdown(fmt.Sprintf("\u26a0 Failed to connect to WhatsApp. Make sure WhatsApp "+
|
msg := format.RenderMarkdown("\u26a0 Failed to connect to WhatsApp. Make sure WhatsApp "+
|
||||||
"on your phone is reachable and use `%s reconnect` to try connecting again.",
|
"on your phone is reachable and use `reconnect` to try connecting again.")
|
||||||
user.bridge.Config.Bridge.CommandPrefix))
|
|
||||||
_, _ = user.bridge.Bot.SendMessageEvent(user.ManagementRoom, mautrix.EventMessage, msg)
|
_, _ = user.bridge.Bot.SendMessageEvent(user.ManagementRoom, mautrix.EventMessage, msg)
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue