Plugin API hook for Shared Channel file attachment sync (#25874)
* option for auto inviting plugin to all shared channels. * auto-invite remotes to shared channels when flag set * fix unit test * immediately ping new remotes; fix unique siteurl bug * make i18n-extract * fix translations * plugin hooks for file attachments * hook for profile image sync * fix profile image sync * fix unit test --------- Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
@@ -58,6 +58,8 @@ const (
|
||||
OnSharedChannelsSyncMsgID = 40
|
||||
OnSharedChannelsPingID = 41
|
||||
PreferencesHaveChangedID = 42
|
||||
OnSharedChannelsAttachmentSyncMsgID = 43
|
||||
OnSharedChannelsProfileImageSyncMsgID = 44
|
||||
TotalHooksID = iota
|
||||
)
|
||||
|
||||
@@ -362,4 +364,22 @@ type Hooks interface {
|
||||
//
|
||||
// Minimum server version: 9.5
|
||||
PreferencesHaveChanged(c *Context, preferences []model.Preference)
|
||||
|
||||
// OnSharedChannelsAttachmentSyncMsg is invoked for plugins that wish to receive synchronization messages from the
|
||||
// Shared Channels service for which they have been invited via InviteRemote. Each call represents one file attachment
|
||||
// to be synchronized.
|
||||
//
|
||||
// The cursor will be advanced based on the timestamp returned if no error is returned.
|
||||
//
|
||||
// Minimum server version: 9.5
|
||||
OnSharedChannelsAttachmentSyncMsg(fi *model.FileInfo, post *model.Post, rc *model.RemoteCluster) error
|
||||
|
||||
// OnSharedChannelsProfileImageSyncMsg is invoked for plugins that wish to receive synchronization messages from the
|
||||
// Shared Channels service for which they have been invited via InviteRemote. Each call represents one user profile
|
||||
// image that should be synchronized. `App.GetProfileImage` can be used to fetch the image bytes.
|
||||
//
|
||||
// The cursor will be advanced based on the timestamp returned if no error is returned.
|
||||
//
|
||||
// Minimum server version: 9.5
|
||||
OnSharedChannelsProfileImageSyncMsg(user *model.User, rc *model.RemoteCluster) error
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user