From 4fff383de5b4ba2300d1acd81315f66d25fb90ac Mon Sep 17 00:00:00 2001 From: Luke Barnard Date: Fri, 3 Mar 2017 10:02:08 +0000 Subject: [PATCH] Fix resend bar and "send anyway" in UDD --- src/Resend.js | 5 +++-- src/components/views/dialogs/UnknownDeviceDialog.js | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Resend.js b/src/Resend.js index d06562780c..bbd980ea7f 100644 --- a/src/Resend.js +++ b/src/Resend.js @@ -18,18 +18,19 @@ var MatrixClientPeg = require('./MatrixClientPeg'); var dis = require('./dispatcher'); var sdk = require('./index'); var Modal = require('./Modal'); +import { EventStatus } from 'matrix-js-sdk'; module.exports = { resendUnsentEvents: function(room) { room.getPendingEvents().filter(function(ev) { - return ev.status === Matrix.EventStatus.NOT_SENT; + return ev.status === EventStatus.NOT_SENT; }).forEach(function(event) { module.exports.resend(event); }); }, cancelUnsentEvents: function(room) { room.getPendingEvents().filter(function(ev) { - return ev.status === Matrix.EventStatus.NOT_SENT; + return ev.status === EventStatus.NOT_SENT; }).forEach(function(event) { module.exports.removeFromQueue(event); }); diff --git a/src/components/views/dialogs/UnknownDeviceDialog.js b/src/components/views/dialogs/UnknownDeviceDialog.js index 3581b9815e..da9c8e8f65 100644 --- a/src/components/views/dialogs/UnknownDeviceDialog.js +++ b/src/components/views/dialogs/UnknownDeviceDialog.js @@ -19,6 +19,7 @@ import sdk from '../../../index'; import dis from '../../../dispatcher'; import MatrixClientPeg from '../../../MatrixClientPeg'; import GeminiScrollbar from 'react-gemini-scrollbar'; +import Resend from '../../../Resend'; function DeviceListEntry(props) { const {userId, device} = props;