Код: Выделить всё
import {
StreamMessage,
CustomMessageActionItem,
DefaultStreamChatGenerics
} from "stream-chat-angular";
customActions: CustomMessageActionItem[] = [
{
actionName: 'custom-action',
actionLabelOrTranslationKey: 'Custom Action',
actionHandler: (message: StreamMessage) => {
console.log('Custom action executed for:', message);
},
isVisible: (enabledActions: string[]) => {
return enabledActions.includes('custom-action');
},
}
];
ngAfterViewInit(): void {
this.messageActionsService.customActions$.next(this.customActions);
}Подробнее здесь: https://stackoverflow.com/questions/793 ... ge-actions