diff --git a/src/components/views/messages/DecryptionFailureBody.tsx b/src/components/views/messages/DecryptionFailureBody.tsx index 0120b960a8..028671f584 100644 --- a/src/components/views/messages/DecryptionFailureBody.tsx +++ b/src/components/views/messages/DecryptionFailureBody.tsx @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from "react"; +import React, { forwardRef } from "react"; import { MatrixEvent } from "matrix-js-sdk/src/matrix"; import { _t } from "../../../languageHandler"; @@ -27,6 +27,12 @@ function getErrorMessage(mxEvent?: MatrixEvent): string { } // A placeholder element for messages that could not be decrypted -export function DecryptionFailureBody({ mxEvent }: Partial): JSX.Element { - return
{getErrorMessage(mxEvent)}
; -} +export const DecryptionFailureBody = forwardRef>( + ({ mxEvent }, ref): JSX.Element => { + return ( +
+ {getErrorMessage(mxEvent)} +
+ ); + }, +);