|
1 | 1 | import { |
2 | | - createCommandInjectionMiddleware, |
3 | | - createCommandStringExtractionMiddleware, |
4 | | - createDraftCommandInjectionMiddleware, |
| 2 | + // createCommandInjectionMiddleware, |
| 3 | + // createCommandStringExtractionMiddleware, |
| 4 | + // createDraftCommandInjectionMiddleware, |
5 | 5 | MessageComposer, |
6 | | - TextComposerMiddleware, |
| 6 | + // TextComposerMiddleware, |
7 | 7 | } from 'stream-chat'; |
8 | 8 |
|
| 9 | +// TODO: Comment out once the commands PR has been merged on the LLC |
| 10 | +// @ts-ignore |
9 | 11 | export const setupCommandUIMiddleware = (messageComposer: MessageComposer) => { |
10 | | - messageComposer.compositionMiddlewareExecutor.insert({ |
11 | | - middleware: [createCommandInjectionMiddleware(messageComposer)], |
12 | | - position: { after: 'stream-io/message-composer-middleware/attachments' }, |
13 | | - }); |
14 | | - |
15 | | - messageComposer.draftCompositionMiddlewareExecutor.insert({ |
16 | | - middleware: [createDraftCommandInjectionMiddleware(messageComposer)], |
17 | | - position: { after: 'stream-io/message-composer-middleware/draft-attachments' }, |
18 | | - }); |
19 | | - |
20 | | - messageComposer.textComposer.middlewareExecutor.insert({ |
21 | | - middleware: [createCommandStringExtractionMiddleware() as TextComposerMiddleware], |
22 | | - position: { after: 'stream-io/text-composer/commands-middleware' }, |
23 | | - }); |
| 12 | + // TODO: Comment out once the commands PR has been merged on the LLC |
| 13 | + // messageComposer.compositionMiddlewareExecutor.insert({ |
| 14 | + // middleware: [createCommandInjectionMiddleware(messageComposer)], |
| 15 | + // position: { after: 'stream-io/message-composer-middleware/attachments' }, |
| 16 | + // }); |
| 17 | + // |
| 18 | + // messageComposer.draftCompositionMiddlewareExecutor.insert({ |
| 19 | + // middleware: [createDraftCommandInjectionMiddleware(messageComposer)], |
| 20 | + // position: { after: 'stream-io/message-composer-middleware/draft-attachments' }, |
| 21 | + // }); |
| 22 | + // |
| 23 | + // messageComposer.textComposer.middlewareExecutor.insert({ |
| 24 | + // middleware: [createCommandStringExtractionMiddleware() as TextComposerMiddleware], |
| 25 | + // position: { after: 'stream-io/text-composer/commands-middleware' }, |
| 26 | + // }); |
24 | 27 | }; |
0 commit comments