GetStream Chat пользовательские действия с сообщениямиJavascript

Форум по Javascript
Anonymous
GetStream Chat пользовательские действия с сообщениями

Сообщение Anonymous »

Следуя их документу на https://getstream.io/chat/docs/sdk/angu ... Component/, я добавил свое собственное действие с сообщением, но, похоже, оно не сработало, надеясь, что кто-нибудь сможет мне помочь< /p>

Код: Выделить всё

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

Вернуться в «Javascript»