mirror of
https://github.com/cwinfo/matterbridge.git
synced 2025-07-02 15:06:17 +00:00
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
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user