(feature) New MessagesWillBeConsumed Server Plugin Hook (#23305)
* feature: implemented basic MessageWillBeConsumed hook and applied on GetSinglePost method. * use hook in get methods * chore: refactored hook usage and created utils functions to apply hook * bugfix: single post not updating * chore: adjusted hook to return post * chore: reverted some uneeded changes * chore: updated hook to accept slice of posts * bugfix: slice filled with niil values * chore: MessageWillBeConsumed ranamed to MessagesWillBeConsumed * Update plugin/hooks.go Co-authored-by: Jesse Hallam <jesse@thehallams.ca> * Add feature flag * Update min version * update tests to account for feature flag * fix linting issues --------- Co-authored-by: Matej Topolovac <> Co-authored-by: mtopolovac <43346061+mtopolovac@users.noreply.github.com> Co-authored-by: Jesse Hallam <jesse@thehallams.ca> Co-authored-by: Kevin Hsieh <kevinh@qrypt.com> Co-authored-by: Jesse Hallam <jesse.hallam@gmail.com>
Этот коммит содержится в:
@@ -43,6 +43,8 @@ type FeatureFlags struct {
|
||||
EnableExportDirectDownload bool
|
||||
|
||||
StreamlinedMarketplace bool
|
||||
|
||||
ConsumePostHook bool
|
||||
}
|
||||
|
||||
func (f *FeatureFlags) SetDefaults() {
|
||||
@@ -58,6 +60,7 @@ func (f *FeatureFlags) SetDefaults() {
|
||||
f.CloudReverseTrial = false
|
||||
f.EnableExportDirectDownload = false
|
||||
f.StreamlinedMarketplace = true
|
||||
f.ConsumePostHook = false
|
||||
}
|
||||
|
||||
// ToMap returns the feature flags as a map[string]string
|
||||
|
||||
Ссылка в новой задаче
Block a user