fix bot answer (in muc)
This commit is contained in:
parent
18300ccc44
commit
e962b935b3
|
@ -100,9 +100,13 @@ func Init(config *lib.NotifyConfig, db *database.DB, bot *bot.Bot) notify.Notifi
|
||||||
}
|
}
|
||||||
|
|
||||||
bot.Handle(func(answer string) {
|
bot.Handle(func(answer string) {
|
||||||
|
to := msg.From
|
||||||
|
if msg.Type == xmpp.MessageTypeGroupchat && !to.IsBare() {
|
||||||
|
to = to.Bare()
|
||||||
|
}
|
||||||
err := client.Send(&xmpp.MessageClient{
|
err := client.Send(&xmpp.MessageClient{
|
||||||
Type: msg.Type,
|
Type: msg.Type,
|
||||||
To: msg.From,
|
To: to,
|
||||||
Body: answer,
|
Body: answer,
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in New Issue