MM-56082 Add PreferencesHaveChanged plugin hook (#25659)
* Add interface for PreferencesHaveChanged hook * Add context to preference-related methods of App * Implement PreferencesHaveChanged * Re-add missing "fmt" import * Update minimum server version for the new hook * Remove pointers to be consistent with other preference APIs
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
18f0d8d88f
Коммит
502cd6ef7d
@@ -57,6 +57,7 @@ const (
|
||||
ServeMetricsID = 39
|
||||
OnSharedChannelsSyncMsgID = 40
|
||||
OnSharedChannelsPingID = 41
|
||||
PreferencesHaveChangedID = 42
|
||||
TotalHooksID = iota
|
||||
)
|
||||
|
||||
@@ -354,4 +355,11 @@ type Hooks interface {
|
||||
//
|
||||
// Minimum server version: 9.5
|
||||
OnSharedChannelsPing(rc *model.RemoteCluster) bool
|
||||
|
||||
// PreferencesHaveChanged is invoked after one or more of a user's preferences have changed.
|
||||
// Note that this method will be called for preferences changed by plugins, including the plugin that changed
|
||||
// the preferences.
|
||||
//
|
||||
// Minimum server version: 9.5
|
||||
PreferencesHaveChanged(c *Context, preferences []model.Preference)
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user