diff options
author | Wim <wim@42.be> | 2019-01-18 18:35:31 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-18 18:35:31 +0100 |
commit | fb713ed91bfb48c0037e489f80be85c54e69953a (patch) | |
tree | e82901d1a604b02bbb5e3a2c4712f20e61d0513b /bridge/config/config.go | |
parent | d99eacc2e1b0deadc7368b35adf0818493fd2fb9 (diff) | |
download | matterbridge-msglm-fb713ed91bfb48c0037e489f80be85c54e69953a.tar.gz matterbridge-msglm-fb713ed91bfb48c0037e489f80be85c54e69953a.tar.bz2 matterbridge-msglm-fb713ed91bfb48c0037e489f80be85c54e69953a.zip |
Add initial support for getting ChannelMember info of all bridges (#678)
* Add initial support for getting ChannelMember info of all bridges.
Adds an EventGetChannelMembers event, which gets send every x time to
all bridges. Bridges should respond on this event with a Message
containing ChannelMembers in the EventGetChannelMembers key in the
Extra field.
handleEventGetChannelMembers will handle this Message and sets the
contained ChannelMembers to the Bridge struct.
* Add ChannelMembers support to the slack bridge
Diffstat (limited to 'bridge/config/config.go')
-rw-r--r-- | bridge/config/config.go | 31 |
1 files changed, 21 insertions, 10 deletions
diff --git a/bridge/config/config.go b/bridge/config/config.go index 932de2eb..3d1206c7 100644 --- a/bridge/config/config.go +++ b/bridge/config/config.go @@ -14,16 +14,17 @@ import ( ) const ( - EventJoinLeave = "join_leave" - EventTopicChange = "topic_change" - EventFailure = "failure" - EventFileFailureSize = "file_failure_size" - EventAvatarDownload = "avatar_download" - EventRejoinChannels = "rejoin_channels" - EventUserAction = "user_action" - EventMsgDelete = "msg_delete" - EventAPIConnected = "api_connected" - EventUserTyping = "user_typing" + EventJoinLeave = "join_leave" + EventTopicChange = "topic_change" + EventFailure = "failure" + EventFileFailureSize = "file_failure_size" + EventAvatarDownload = "avatar_download" + EventRejoinChannels = "rejoin_channels" + EventUserAction = "user_action" + EventMsgDelete = "msg_delete" + EventAPIConnected = "api_connected" + EventUserTyping = "user_typing" + EventGetChannelMembers = "get_channel_members" ) type Message struct { @@ -61,6 +62,16 @@ type ChannelInfo struct { Options ChannelOptions } +type ChannelMember struct { + Username string + Nick string + UserID string + ChannelID string + ChannelName string +} + +type ChannelMembers []ChannelMember + type Protocol struct { AuthCode string // steam BindAddress string // mattermost, slack // DEPRECATED |