From 8e6ddadba20135d990046f05d1a5d2b64b019138 Mon Sep 17 00:00:00 2001 From: ldruschk <14059613+ldruschk@users.noreply.github.com> Date: Sat, 18 Apr 2020 22:00:35 +0200 Subject: Relay Joins/Topic changes in RocketChat bridge (#1085) This pull request properly sets the events EventJoinLeave and EventTopicChange for messages from the RocketChat bridge and drops messages which are neither one of those events nor plain messages. --- bridge/rocketchat/rocketchat.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'bridge/rocketchat/rocketchat.go') diff --git a/bridge/rocketchat/rocketchat.go b/bridge/rocketchat/rocketchat.go index 59f0e99c..405beadc 100644 --- a/bridge/rocketchat/rocketchat.go +++ b/bridge/rocketchat/rocketchat.go @@ -29,6 +29,12 @@ type Brocketchat struct { sync.RWMutex } +const ( + sUserJoined = "uj" + sUserLeft = "ul" + sRoomChangedTopic = "room_changed_topic" +) + func New(cfg *bridge.Config) bridge.Bridger { newCache, err := lru.New(100) if err != nil { -- cgit v1.2.3