fix bot answer (in muc)

This commit is contained in:
Martin/Geno 2018-04-13 22:11:38 +02:00
parent 18300ccc44
commit e962b935b3
No known key found for this signature in database
GPG Key ID: 9D7D3C6BFF600C6A
1 changed files with 5 additions and 1 deletions

View File

@ -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 {