summaryrefslogtreecommitdiff
path: root/xmpp/presence.go
diff options
context:
space:
mode:
Diffstat (limited to 'xmpp/presence.go')
-rw-r--r--xmpp/presence.go13
1 files changed, 4 insertions, 9 deletions
diff --git a/xmpp/presence.go b/xmpp/presence.go
index b6ea3b5..00eaa47 100644
--- a/xmpp/presence.go
+++ b/xmpp/presence.go
@@ -10,15 +10,10 @@ func (s *session) sendPresence() {
xml.Name{"", "presence"},
[]xml.Attr{},
}
- end := start.End()
- tokens := [...]xml.Token{start, end}
-
- for _, v := range tokens {
- err := s.ed.encodeToken(v)
- if err != nil {
- log.Println("Could not encode presence!")
- return
- }
+ err := s.tx.EncodeElement(struct{}{}, start)
+ if err != nil {
+ log.Println("Could not encode presence!")
+ return
}
}