From e962b935b3e241fdfd172beee20800eac05fd1fc Mon Sep 17 00:00:00 2001 From: Martin/Geno Date: Fri, 13 Apr 2018 22:11:38 +0200 Subject: [PATCH] fix bot answer (in muc) --- notify/xmpp/main.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/notify/xmpp/main.go b/notify/xmpp/main.go index 0612e27..7e2210e 100644 --- a/notify/xmpp/main.go +++ b/notify/xmpp/main.go @@ -100,9 +100,13 @@ func Init(config *lib.NotifyConfig, db *database.DB, bot *bot.Bot) notify.Notifi } bot.Handle(func(answer string) { + to := msg.From + if msg.Type == xmpp.MessageTypeGroupchat && !to.IsBare() { + to = to.Bare() + } err := client.Send(&xmpp.MessageClient{ Type: msg.Type, - To: msg.From, + To: to, Body: answer, }) if err != nil {