rename helper method

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
pull/21833/head
Michael Telatynski 2019-06-27 19:41:29 +01:00
parent cebb2b773f
commit e8db379fed
1 changed files with 3 additions and 3 deletions

View File

@ -34,7 +34,7 @@ import WidgetUtils from "./utils/WidgetUtils";
import {textToHtmlRainbow} from "./utils/colour";
import Promise from "bluebird";
const requestSingleFileUpload = async () => {
const singleMxcUpload = async () => {
return new Promise((resolve) => {
const fileSelector = document.createElement('input');
fileSelector.setAttribute('type', 'file');
@ -242,7 +242,7 @@ export const CommandMap = {
let promise = Promise.resolve(args);
if (!args) {
promise = requestSingleFileUpload();
promise = singleMxcUpload();
}
return success(promise.then((url) => {
@ -263,7 +263,7 @@ export const CommandMap = {
runFn: function(roomId, args) {
let promise = Promise.resolve(args);
if (!args) {
promise = requestSingleFileUpload();
promise = singleMxcUpload();
}
return success(promise.then((url) => {