[MM-59361] custom groups & read only channels (#28892)

* added group mention, read only view and post event tracking

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
Guillermo Vayá
2024-10-28 13:41:29 +01:00
коммит произвёл GitHub
родитель c64215f6c2
Коммит a532b70317
13 изменённых файлов: 309 добавлений и 12 удалений

Просмотреть файл

@@ -1918,6 +1918,38 @@ func (s *TimerLayerChannelStore) InvalidatePinnedPostCount(channelID string) {
}
}
func (s *TimerLayerChannelStore) IsChannelReadOnlyScheme(schemeID string) (bool, error) {
start := time.Now()
result, err := s.ChannelStore.IsChannelReadOnlyScheme(schemeID)
elapsed := float64(time.Since(start)) / float64(time.Second)
if s.Root.Metrics != nil {
success := "false"
if err == nil {
success = "true"
}
s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.IsChannelReadOnlyScheme", success, elapsed)
}
return result, err
}
func (s *TimerLayerChannelStore) IsReadOnlyChannel(channelID string) (bool, error) {
start := time.Now()
result, err := s.ChannelStore.IsReadOnlyChannel(channelID)
elapsed := float64(time.Since(start)) / float64(time.Second)
if s.Root.Metrics != nil {
success := "false"
if err == nil {
success = "true"
}
s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.IsReadOnlyChannel", success, elapsed)
}
return result, err
}
func (s *TimerLayerChannelStore) MigrateChannelMembers(fromChannelID string, fromUserID string) (map[string]string, error) {
start := time.Now()