diff options
author | rrigby <ryan.rigby@griffithuni.edu.au> | 2017-11-08 09:36:20 +1000 |
---|---|---|
committer | Wim <wim@42.be> | 2017-11-08 00:36:20 +0100 |
commit | 27e94c438d370c77aa3b2634b615ffafe1828310 (patch) | |
tree | db329d22f4259693aefc7ef96598c7a733ae346e | |
parent | 58392876df5e9cc4fa6f0d386bfc4ebfc516d26d (diff) | |
download | matterbridge-msglm-27e94c438d370c77aa3b2634b615ffafe1828310.tar.gz matterbridge-msglm-27e94c438d370c77aa3b2634b615ffafe1828310.tar.bz2 matterbridge-msglm-27e94c438d370c77aa3b2634b615ffafe1828310.zip |
Add support for bridging to individual steam chats. (steam) (#294)
-rw-r--r-- | bridge/steam/steam.go | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/bridge/steam/steam.go b/bridge/steam/steam.go index 60b2f1bf..7eaef46a 100644 --- a/bridge/steam/steam.go +++ b/bridge/steam/steam.go @@ -105,8 +105,13 @@ func (b *Bsteam) handleEvents() { case *steam.ChatMsgEvent: flog.Debugf("Receiving ChatMsgEvent: %#v", e) flog.Debugf("Sending message from %s on %s to gateway", b.getNick(e.ChatterId), b.Account) - // for some reason we have to remove 0x18000000000000 - channel := int64(e.ChatRoomId) - 0x18000000000000 + var channel int64 + if e.ChatRoomId == 0 { + channel = int64(e.ChatterId) + } else { + // for some reason we have to remove 0x18000000000000 + channel = int64(e.ChatRoomId) - 0x18000000000000 + } msg := config.Message{Username: b.getNick(e.ChatterId), Text: e.Message, Channel: strconv.FormatInt(channel, 10), Account: b.Account, UserID: strconv.FormatInt(int64(e.ChatterId), 10)} b.Remote <- msg case *steam.PersonaStateEvent: |