1
0
Fork 0

Send subscribe presence

This commit is contained in:
chteufleur 2015-10-23 14:41:11 +02:00
parent c88585fc5a
commit cec14b399f
2 changed files with 5 additions and 2 deletions

View File

@ -152,8 +152,6 @@ func gatewaySteamXmppPresence() {
stat := <-steam.ChanPresenceSteam
gameName := <-steam.ChanPresence
SetSteamId[steamId] = struct{}{}
var status string
var tpye string
switch stat {
@ -178,6 +176,10 @@ func gatewaySteamXmppPresence() {
tpye = xmpp.Type_available
}
if _, ok := SetSteamId[steamId]; !ok {
xmpp.SendPresenceFrom(status, xmpp.Type_subscribe, steamId+"@"+xmpp.JidStr, gameName)
SetSteamId[steamId] = struct{}{}
}
xmpp.SendPresenceFrom(status, tpye, steamId+"@"+xmpp.JidStr, gameName)
}
}

View File

@ -18,6 +18,7 @@ const (
Type_available = ""
Type_unavailable = "unavailable"
Type_subscribe = "subscribe"
ActionConnexion = "action_xmpp_connexion"
ActionDeconnexion = "action_xmpp_deconnexion"