Implement ping response according to xep-0199

This commit is contained in:
Sergei
2023-08-18 13:21:57 -07:00
parent 84bd84a051
commit d1f8a0defa

View File

@@ -31,3 +31,14 @@ func (c *Client) SendResultPing(id, toServer string) error {
xmlEscape(toServer), xmlEscape(id))
return err
}
// PingResponse responding to ping query according to xep-0199
func (c *Client) PingResponse(v IQ) (string, error) {
return c.RawInformation(
v.To,
v.From,
v.ID,
IQTypeResult,
"",
)
}