forked from jshiffer/go-xmpp
Status and status message
This commit is contained in:
8
xmpp.go
8
xmpp.go
@@ -136,8 +136,11 @@ type Options struct {
|
||||
// Use server sessions
|
||||
Session bool
|
||||
|
||||
// Status message
|
||||
// Presence Status
|
||||
Status string
|
||||
|
||||
// Status message
|
||||
StatusMessage string
|
||||
}
|
||||
|
||||
// NewClient establishes a new Client connection based on a set of Options.
|
||||
@@ -410,7 +413,8 @@ func (c *Client) init(o *Options) error {
|
||||
}
|
||||
|
||||
// We're connected and can now receive and send messages.
|
||||
fmt.Fprintf(c.conn, "<presence xml:lang='en'><show>xa</show><status>%s</status></presence>", o.Status)
|
||||
fmt.Fprintf(c.conn, "<presence xml:lang='en'><show>%s</show><status>%s</status></presence>", o.Status, o.StatusMessage)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user