Example #1
0
func long(st xmpp.Status) string {
	switch st {
	case xmpp.Unavailable:
		return "unavailable"
	case xmpp.ExtendedAway:
		return "offline"
	case xmpp.Away:
		return "away"
	case xmpp.Available:
		return "available"
	case xmpp.DoNotDisturb:
		return "busy"
	}
	return st.String()
}
Example #2
0
func short(st xmpp.Status) string {
	switch st {
	case xmpp.Unavailable:
		return "?"
	case xmpp.ExtendedAway:
		return "x"
	case xmpp.Away:
		return "-"
	case xmpp.Available:
		return "+"
	case xmpp.DoNotDisturb:
		return "!"
	}
	return st.String()
}