Handle chatstates gone
This commit is contained in:
parent
7e2db9f58b
commit
1e63cc1759
|
|
@ -131,10 +131,13 @@ func (g *GatewayInfo) mainSteam() {
|
||||||
|
|
||||||
case *steam.ChatMsgEvent:
|
case *steam.ChatMsgEvent:
|
||||||
// Message received
|
// Message received
|
||||||
|
from := e.ChatterId.ToString() + "@" + XmppJidComponent
|
||||||
if e.EntryType == steamlang.EChatEntryType_Typing {
|
if e.EntryType == steamlang.EChatEntryType_Typing {
|
||||||
g.SendXmppMessageComposing(e.ChatterId.ToString() + "@" + XmppJidComponent)
|
g.SendXmppMessageComposing(from)
|
||||||
|
} else if e.EntryType == steamlang.EChatEntryType_LeftConversation {
|
||||||
|
g.SendXmppMessageLeaveConversation(from)
|
||||||
} else {
|
} else {
|
||||||
g.SendXmppMessage(e.ChatterId.ToString()+"@"+XmppJidComponent, "", e.Message)
|
g.SendXmppMessage(from, "", e.Message)
|
||||||
}
|
}
|
||||||
|
|
||||||
case *steam.ChatInviteEvent:
|
case *steam.ChatInviteEvent:
|
||||||
|
|
|
||||||
|
|
@ -180,6 +180,10 @@ func (g *GatewayInfo) SendXmppMessage(from, subject, message string) {
|
||||||
g.stopComposingTimer(from)
|
g.stopComposingTimer(from)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (g *GatewayInfo) SendXmppMessageLeaveConversation(from string) {
|
||||||
|
g.sendXmppMessage(from, "", "", &xmpp.Gone{})
|
||||||
|
}
|
||||||
|
|
||||||
func (g *GatewayInfo) SendXmppMessageComposing(from string) {
|
func (g *GatewayInfo) SendXmppMessageComposing(from string) {
|
||||||
g.sendXmppMessage(from, "", "", &xmpp.Composing{})
|
g.sendXmppMessage(from, "", "", &xmpp.Composing{})
|
||||||
g.stopComposingTimer(from)
|
g.stopComposingTimer(from)
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
{"Addresses":[{"IP":"162.254.197.42","Port":27021},{"IP":"146.66.152.10","Port":27020},{"IP":"162.254.197.42","Port":27018},{"IP":"162.254.197.41","Port":27019},{"IP":"146.66.152.10","Port":27017},{"IP":"146.66.152.11","Port":27017},{"IP":"146.66.152.11","Port":27019},{"IP":"146.66.152.11","Port":27018},{"IP":"146.66.152.11","Port":27020},{"IP":"162.254.197.40","Port":27018},{"IP":"162.254.197.41","Port":27018},{"IP":"162.254.197.42","Port":27019},{"IP":"162.254.197.42","Port":27020},{"IP":"162.254.197.40","Port":27017},{"IP":"162.254.197.40","Port":27020},{"IP":"146.66.152.10","Port":27019},{"IP":"162.254.197.42","Port":27017},{"IP":"162.254.197.41","Port":27017},{"IP":"162.254.197.40","Port":27019},{"IP":"162.254.197.41","Port":27021},{"IP":"146.66.152.10","Port":27018},{"IP":"162.254.197.41","Port":27020},{"IP":"162.254.196.43","Port":27020},{"IP":"162.254.196.43","Port":27017},{"IP":"162.254.196.42","Port":27019},{"IP":"162.254.196.42","Port":27017},{"IP":"162.254.196.43","Port":27019},{"IP":"162.254.196.43","Port":27018},{"IP":"162.254.196.42","Port":27018},{"IP":"162.254.196.41","Port":27021},{"IP":"162.254.196.40","Port":27020},{"IP":"162.254.196.40","Port":27019},{"IP":"162.254.196.41","Port":27017},{"IP":"162.254.196.40","Port":27018},{"IP":"162.254.196.43","Port":27021},{"IP":"162.254.196.41","Port":27018},{"IP":"162.254.196.41","Port":27020},{"IP":"162.254.197.40","Port":27021},{"IP":"162.254.196.41","Port":27019},{"IP":"162.254.196.40","Port":27021},{"IP":"162.254.196.42","Port":27021},{"IP":"162.254.196.40","Port":27017},{"IP":"162.254.196.42","Port":27020},{"IP":"146.66.155.8","Port":27019},{"IP":"185.25.182.10","Port":27018},{"IP":"185.25.182.10","Port":27020},{"IP":"185.25.182.10","Port":27017},{"IP":"146.66.155.8","Port":27017},{"IP":"185.25.180.14","Port":27018},{"IP":"185.25.180.14","Port":27017},{"IP":"185.25.182.10","Port":27019},{"IP":"146.66.155.8","Port":27018},{"IP":"185.25.180.15","Port":27018},{"IP":"155.133.242.9","Port":27017},{"IP":"185.25.180.15","Port":27017},{"IP":"185.25.180.15","Port":27019},{"IP":"155.133.242.8","Port":27019},{"IP":"155.133.242.9","Port":27019},{"IP":"185.25.180.14","Port":27020},{"IP":"155.133.242.9","Port":27020},{"IP":"155.133.242.8","Port":27020},{"IP":"185.25.180.14","Port":27019},{"IP":"146.66.155.8","Port":27020},{"IP":"185.25.180.15","Port":27020},{"IP":"155.133.242.8","Port":27017},{"IP":"155.133.242.9","Port":27018},{"IP":"155.133.242.8","Port":27018},{"IP":"208.78.164.13","Port":27017},{"IP":"208.78.164.12","Port":27018},{"IP":"208.78.164.10","Port":27019},{"IP":"208.78.164.10","Port":27018},{"IP":"208.78.164.13","Port":27019},{"IP":"208.78.164.12","Port":27019},{"IP":"208.78.164.14","Port":27017},{"IP":"208.78.164.13","Port":27018},{"IP":"208.78.164.14","Port":27019},{"IP":"208.78.164.12","Port":27017},{"IP":"208.78.164.14","Port":27018},{"IP":"208.78.164.10","Port":27017},{"IP":"162.254.195.44","Port":27018}]}
|
{"Addresses":[{"IP":"162.254.197.40","Port":27019},{"IP":"146.66.152.11","Port":27018},{"IP":"162.254.197.42","Port":27017},{"IP":"146.66.152.11","Port":27017},{"IP":"146.66.152.10","Port":27017},{"IP":"162.254.197.42","Port":27021},{"IP":"162.254.197.40","Port":27020},{"IP":"162.254.197.41","Port":27020},{"IP":"162.254.197.41","Port":27019},{"IP":"146.66.152.11","Port":27019},{"IP":"146.66.152.10","Port":27019},{"IP":"146.66.152.10","Port":27018},{"IP":"162.254.197.42","Port":27019},{"IP":"146.66.152.11","Port":27020},{"IP":"162.254.197.42","Port":27020},{"IP":"162.254.197.40","Port":27021},{"IP":"162.254.197.41","Port":27017},{"IP":"162.254.197.42","Port":27018},{"IP":"162.254.197.41","Port":27021},{"IP":"162.254.197.40","Port":27018},{"IP":"162.254.197.40","Port":27017},{"IP":"146.66.152.10","Port":27020},{"IP":"162.254.196.42","Port":27020},{"IP":"162.254.197.41","Port":27018},{"IP":"162.254.196.40","Port":27017},{"IP":"162.254.196.42","Port":27018},{"IP":"162.254.196.43","Port":27021},{"IP":"162.254.196.41","Port":27020},{"IP":"162.254.196.41","Port":27019},{"IP":"162.254.196.43","Port":27020},{"IP":"162.254.196.41","Port":27018},{"IP":"162.254.196.41","Port":27021},{"IP":"162.254.196.42","Port":27017},{"IP":"162.254.196.40","Port":27018},{"IP":"162.254.196.43","Port":27019},{"IP":"162.254.196.43","Port":27018},{"IP":"162.254.196.41","Port":27017},{"IP":"162.254.196.40","Port":27020},{"IP":"162.254.196.43","Port":27017},{"IP":"162.254.196.42","Port":27021},{"IP":"162.254.196.42","Port":27019},{"IP":"162.254.196.40","Port":27021},{"IP":"162.254.196.40","Port":27019},{"IP":"146.66.155.8","Port":27017},{"IP":"146.66.155.8","Port":27018},{"IP":"185.25.182.10","Port":27017},{"IP":"146.66.155.8","Port":27020},{"IP":"185.25.182.10","Port":27019},{"IP":"155.133.242.8","Port":27018},{"IP":"185.25.180.15","Port":27018},{"IP":"185.25.180.15","Port":27020},{"IP":"155.133.242.8","Port":27017},{"IP":"185.25.182.10","Port":27020},{"IP":"155.133.242.8","Port":27020},{"IP":"185.25.182.10","Port":27018},{"IP":"155.133.242.9","Port":27017},{"IP":"155.133.242.9","Port":27019},{"IP":"185.25.180.14","Port":27017},{"IP":"185.25.180.15","Port":27017},{"IP":"155.133.242.9","Port":27020},{"IP":"146.66.155.8","Port":27019},{"IP":"155.133.242.8","Port":27019},{"IP":"185.25.180.14","Port":27019},{"IP":"185.25.180.14","Port":27018},{"IP":"155.133.242.9","Port":27018},{"IP":"185.25.180.14","Port":27020},{"IP":"185.25.180.15","Port":27019},{"IP":"208.78.164.10","Port":27017},{"IP":"208.78.164.12","Port":27018},{"IP":"208.78.164.13","Port":27017},{"IP":"208.78.164.14","Port":27019},{"IP":"208.78.164.14","Port":27018},{"IP":"208.78.164.10","Port":27018},{"IP":"208.78.164.13","Port":27018},{"IP":"208.78.164.12","Port":27019},{"IP":"208.78.164.10","Port":27019},{"IP":"208.78.164.13","Port":27019},{"IP":"208.78.164.12","Port":27017},{"IP":"208.78.164.14","Port":27017},{"IP":"162.254.195.45","Port":27017}]}
|
||||||
Loading…
Reference in New Issue