xmppo/go-xmpp

Extend SendPresence() to at least minimal useful form

eleksir opened this issue · 1 comments

Looks like SendPresence() function is stub:
https://github.com/mattn/go-xmpp/blob/bef3e549f7192032a4acf2bb73d359bdf9f060ca/xmpp.go#L1087-L1089

Seems it just sends "from" and "to" to StanzaWriter (which is io.Writer iface) but does not send actual status, as per https://www.ietf.org/rfc/rfc3921.txt, paragraph 2.2.

Dunno if it is designed to "be like this". If not, i'll spend a couple of hours to extend it to minimal fatness, to be able to fetch all required fields from Presence struct. And PR it.

(I just want to set statuses "Unavailable"/"Ready to chat" for my bot)

Okay, made PR.
#150