From db25147a1991f084dc52fef9e2b410c55978c36d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Brandner?= Date: Tue, 14 Sep 2021 17:49:18 +0200 Subject: [PATCH] Remove message_send_failed as it was unused MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Šimon Brandner --- src/Resend.ts | 5 ----- src/components/structures/MatrixChat.tsx | 7 +------ 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/src/Resend.ts b/src/Resend.ts index 38b84a28e0..be9fb9550b 100644 --- a/src/Resend.ts +++ b/src/Resend.ts @@ -48,11 +48,6 @@ export default class Resend { // XXX: temporary logging to try to diagnose // https://github.com/vector-im/element-web/issues/3148 console.log('Resend got send failure: ' + err.name + '(' + err + ')'); - - dis.dispatch({ - action: 'message_send_failed', - event: event, - }); }); } diff --git a/src/components/structures/MatrixChat.tsx b/src/components/structures/MatrixChat.tsx index 531dc9fbe9..0156d47d20 100644 --- a/src/components/structures/MatrixChat.tsx +++ b/src/components/structures/MatrixChat.tsx @@ -1897,15 +1897,10 @@ export default class MatrixChat extends React.PureComponent { onSendEvent(roomId: string, event: MatrixEvent) { const cli = MatrixClientPeg.get(); - if (!cli) { - dis.dispatch({ action: 'message_send_failed' }); - return; - } + if (!cli) return; cli.sendEvent(roomId, event.getType(), event.getContent()).then(() => { dis.dispatch({ action: 'message_sent' }); - }, (err) => { - dis.dispatch({ action: 'message_send_failed' }); }); }