attach message_sent and replies to file uploads
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
34b427d15e
commit
7048d85246
3 changed files with 26 additions and 23 deletions
|
@ -45,6 +45,7 @@ import { KeyCode, isOnlyCtrlOrCmdKeyEvent } from '../../Keyboard';
|
|||
import RoomViewStore from '../../stores/RoomViewStore';
|
||||
import RoomScrollStateStore from '../../stores/RoomScrollStateStore';
|
||||
import SettingsStore from "../../settings/SettingsStore";
|
||||
import Reply from "../views/elements/Reply";
|
||||
|
||||
const DEBUG = false;
|
||||
let debuglog = function() {};
|
||||
|
@ -895,11 +896,17 @@ module.exports = React.createClass({
|
|||
return;
|
||||
}
|
||||
|
||||
const baseContent = Reply.getMRelatesTo(RoomViewStore.getQuotingEvent());
|
||||
|
||||
ContentMessages.sendContentToRoom(
|
||||
file, this.state.room.roomId, MatrixClientPeg.get(),
|
||||
).done(undefined, (error) => {
|
||||
file, this.state.room.roomId, MatrixClientPeg.get(), baseContent,
|
||||
).done(() => {
|
||||
dis.dispatch({
|
||||
action: 'message_sent',
|
||||
});
|
||||
}, (error) => {
|
||||
if (error.name === "UnknownDeviceError") {
|
||||
// Let the staus bar handle this
|
||||
// Let the status bar handle this
|
||||
return;
|
||||
}
|
||||
const ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue