Add support for actions in the unreads bar from plugins (#24265)
* Add support for actions in the unreads bar from plugins * Adding channelId as parameter * Fixing linter errors * Changing the extensibility to the new messages separator * Making everything work with the plugin * Fixing linter and types errors * Fixing unit test * Tiny improvement in the styles --------- Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
f46694037d
Коммит
4145fd2f4e
@@ -508,6 +508,12 @@ export default class PluginRegistry {
|
||||
return dispatchPluginComponentAction('PostEditorAction', this.id, component);
|
||||
});
|
||||
|
||||
// Register a component to the add to the new messages separator.
|
||||
// Accepts a React component. Returns a unique identifier.
|
||||
registerNewMessagesSeparatorActionComponent = reArg(['component'], ({component}: DPluginComponentProp) => {
|
||||
return dispatchPluginComponentAction('NewMessagesSeparatorAction', this.id, component);
|
||||
});
|
||||
|
||||
// Register a post menu list item by providing some text and an action function.
|
||||
// Accepts the following:
|
||||
// - text - A string or React element to display in the menu
|
||||
|
||||
Ссылка в новой задаче
Block a user