Fix a few bugs introduced in file upload rework
* Fix the widget picture_snapshot command (not that I can find anything that uses it) * Remove unused prop * Fix plural on ContentMessages
This commit is contained in:
parent
a109e06b0b
commit
c8ba7d3434
2 changed files with 5 additions and 5 deletions
|
@ -536,7 +536,9 @@ module.exports = React.createClass({
|
||||||
payload.data.description || payload.data.name);
|
payload.data.description || payload.data.name);
|
||||||
break;
|
break;
|
||||||
case 'picture_snapshot':
|
case 'picture_snapshot':
|
||||||
this.uploadFile(payload.file);
|
return ContentMessages.sharedInstance().sendContentListToRoom(
|
||||||
|
[payload.file], this.state.room.roomId, MatrixClientPeg.get(),
|
||||||
|
);
|
||||||
break;
|
break;
|
||||||
case 'notifier_enabled':
|
case 'notifier_enabled':
|
||||||
case 'upload_started':
|
case 'upload_started':
|
||||||
|
|
|
@ -47,7 +47,7 @@ import {Completion} from "../../../autocomplete/Autocompleter";
|
||||||
import Markdown from '../../../Markdown';
|
import Markdown from '../../../Markdown';
|
||||||
import ComposerHistoryManager from '../../../ComposerHistoryManager';
|
import ComposerHistoryManager from '../../../ComposerHistoryManager';
|
||||||
import MessageComposerStore from '../../../stores/MessageComposerStore';
|
import MessageComposerStore from '../../../stores/MessageComposerStore';
|
||||||
import ContentMessage from '../../../ContentMessages';
|
import ContentMessages from '../../../ContentMessages';
|
||||||
|
|
||||||
import {MATRIXTO_URL_PATTERN} from '../../../linkify-matrix';
|
import {MATRIXTO_URL_PATTERN} from '../../../linkify-matrix';
|
||||||
|
|
||||||
|
@ -139,8 +139,6 @@ export default class MessageComposerInput extends React.Component {
|
||||||
// js-sdk Room object
|
// js-sdk Room object
|
||||||
room: PropTypes.object.isRequired,
|
room: PropTypes.object.isRequired,
|
||||||
|
|
||||||
onFilesPasted: PropTypes.func,
|
|
||||||
|
|
||||||
onInputStateChanged: PropTypes.func,
|
onInputStateChanged: PropTypes.func,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1014,7 +1012,7 @@ export default class MessageComposerInput extends React.Component {
|
||||||
// neither chrome nor firefox let you paste a plain file copied
|
// neither chrome nor firefox let you paste a plain file copied
|
||||||
// from Finder) but more images copied from a different website
|
// from Finder) but more images copied from a different website
|
||||||
// / word processor etc.
|
// / word processor etc.
|
||||||
return ContentMessage.sharedInstance().sendContentListToRoom(
|
return ContentMessages.sharedInstance().sendContentListToRoom(
|
||||||
transfer.files, this.props.room.roomId, this.client,
|
transfer.files, this.props.room.roomId, this.client,
|
||||||
);
|
);
|
||||||
case 'html': {
|
case 'html': {
|
||||||
|
|
Loading…
Reference in a new issue