From 73ba55abadde2893ed2986275821603864cb0fe0 Mon Sep 17 00:00:00 2001 From: Kegan Dougal Date: Wed, 24 Aug 2016 13:47:35 +0100 Subject: [PATCH] s/then/done/ to throw uncaught exceptions if the error function throws --- src/ScalarMessaging.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ScalarMessaging.js b/src/ScalarMessaging.js index afe52a34cc..04686cff9c 100644 --- a/src/ScalarMessaging.js +++ b/src/ScalarMessaging.js @@ -163,7 +163,7 @@ function inviteUser(event, roomId, userId) { } } - client.invite(roomId, userId).then(function() { + client.invite(roomId, userId).done(function() { sendResponse(event, { success: true, }); @@ -179,7 +179,7 @@ function setBotOptions(event, roomId, userId) { sendError(event, "You need to be logged in."); return; } - client.sendStateEvent(roomId, "m.room.bot.options", event.data.content, userId).then(() => { + client.sendStateEvent(roomId, "m.room.bot.options", event.data.content, userId).done(() => { sendResponse(event, { success: true, });