mirror of
https://github.com/cwinfo/matterbridge.git
synced 2024-11-09 15:40:27 +00:00
Send user_added and removed event through message channel (mattermost)
This commit is contained in:
parent
1f8016182c
commit
17cc14a9d2
@ -51,13 +51,11 @@ func (m *MMClient) GetChannelId(name string, teamId string) string { //nolint:go
|
||||
if res == name {
|
||||
return channel.Id
|
||||
}
|
||||
} else {
|
||||
if channel.Name == name {
|
||||
} else if channel.Name == name {
|
||||
return channel.Id
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
|
@ -216,10 +216,15 @@ func (m *MMClient) WsReceiver() {
|
||||
if msg.Post != nil {
|
||||
if msg.Text != "" || len(msg.Post.FileIds) > 0 || msg.Post.Type == "slack_attachment" {
|
||||
m.MessageChan <- msg
|
||||
}
|
||||
}
|
||||
continue
|
||||
}
|
||||
}
|
||||
switch msg.Raw.Event {
|
||||
case model.WEBSOCKET_EVENT_USER_ADDED, model.WEBSOCKET_EVENT_USER_REMOVED:
|
||||
m.MessageChan <- msg
|
||||
continue
|
||||
}
|
||||
}
|
||||
|
||||
var response model.WebSocketResponse
|
||||
if err := json.Unmarshal(rawMsg, &response); err == nil && response.IsValid() {
|
||||
|
Loading…
Reference in New Issue
Block a user