summaryrefslogtreecommitdiff
path: root/xmpp/presence.go
diff options
context:
space:
mode:
Diffstat (limited to 'xmpp/presence.go')
-rw-r--r--xmpp/presence.go24
1 files changed, 24 insertions, 0 deletions
diff --git a/xmpp/presence.go b/xmpp/presence.go
new file mode 100644
index 0000000..b6ea3b5
--- /dev/null
+++ b/xmpp/presence.go
@@ -0,0 +1,24 @@
+package xmpp
+
+import (
+ "encoding/xml"
+ "log"
+)
+
+func (s *session) sendPresence() {
+ start := xml.StartElement{
+ 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
+ }
+ }
+}