@@ -12,20 +12,16 @@ import { ISendEventResponse } from "matrix-js-sdk/src/matrix";
1212// we need to import the types for TS, but do not import the sendMessage
1313// function to avoid importing from "@vector-im/matrix-wysiwyg"
1414import { SendMessageParams } from "./utils/message" ;
15- import { retry } from "../../../../utils/promise" ;
1615
17- // Due to issues such as https://github.com/vector-im/element-web/issues/25277, we add retry
18- // attempts to all of the dynamic imports in this file
19- const RETRY_COUNT = 3 ;
20- const SendComposer = lazy ( ( ) => retry ( ( ) => import ( "./SendWysiwygComposer" ) , RETRY_COUNT ) ) ;
21- const EditComposer = lazy ( ( ) => retry ( ( ) => import ( "./EditWysiwygComposer" ) , RETRY_COUNT ) ) ;
16+ const SendComposer = lazy ( ( ) => import ( "./SendWysiwygComposer" ) ) ;
17+ const EditComposer = lazy ( ( ) => import ( "./EditWysiwygComposer" ) ) ;
2218
2319export const dynamicImportSendMessage = async (
2420 message : string ,
2521 isHTML : boolean ,
2622 params : SendMessageParams ,
2723) : Promise < ISendEventResponse | undefined > => {
28- const { sendMessage } = await retry ( ( ) => import ( "./utils/message" ) , RETRY_COUNT ) ;
24+ const { sendMessage } = await import ( "./utils/message" ) ;
2925
3026 return sendMessage ( message , isHTML , params ) ;
3127} ;
@@ -55,7 +51,7 @@ export const dynamicImportConversionFunctions = async (): Promise<{
5551 */
5652 plainToRich ( plain : string , inMessageFormat : boolean ) : Promise < string > ;
5753} > => {
58- const { richToPlain, plainToRich } = await retry ( ( ) => import ( "@vector-im/matrix-wysiwyg" ) , RETRY_COUNT ) ;
54+ const { richToPlain, plainToRich } = await import ( "@vector-im/matrix-wysiwyg" ) ;
5955
6056 return { richToPlain, plainToRich } ;
6157} ;
0 commit comments