mirror of
https://github.com/FluuxIO/go-xmpp.git
synced 2026-05-23 04:23:45 -07:00
Status message option
This commit is contained in:
@@ -133,8 +133,11 @@ type Options struct {
|
||||
// Debug output
|
||||
Debug bool
|
||||
|
||||
//Use server sessions
|
||||
// Use server sessions
|
||||
Session bool
|
||||
|
||||
// Status message
|
||||
Status string
|
||||
}
|
||||
|
||||
// NewClient establishes a new Client connection based on a set of Options.
|
||||
@@ -407,7 +410,7 @@ 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>I for one welcome our new codebot overlords.</status></presence>")
|
||||
fmt.Fprintf(c.conn, "<presence xml:lang='en'><show>xa</show><status>%s</status></presence>", o.Status)
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user