Plugin API for Shared Channels: support auto invite (#25834)
* option for auto inviting plugin to all shared channels. * auto-invite remotes to shared channels when flag set * fix unit test --------- Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
@@ -305,6 +305,7 @@ type RegisterPluginOpts struct {
|
||||
PluginID string // id of this plugin registering
|
||||
CreatorID string // id of the user/bot registering
|
||||
AutoShareDMs bool // when true, all DMs are automatically shared to this remote
|
||||
AutoInvited bool // when true, the plugin is automatically invited and sync'd with all shared channels.
|
||||
}
|
||||
|
||||
// GetOptionFlags returns a Bitmask of option flags as specified by the boolean options.
|
||||
@@ -313,5 +314,8 @@ func (po RegisterPluginOpts) GetOptionFlags() Bitmask {
|
||||
if po.AutoShareDMs {
|
||||
flags |= BitflagOptionAutoShareDMs
|
||||
}
|
||||
if po.AutoInvited {
|
||||
flags |= BitflagOptionAutoInvited
|
||||
}
|
||||
return flags
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user