[FIX] Send thread attachment (#2242)
This commit is contained in:
parent
a7e7d1fdcb
commit
6abfbf615f
|
@ -632,7 +632,14 @@ class MessageBox extends Component {
|
|||
}
|
||||
|
||||
openShareView = (attachments) => {
|
||||
Navigation.navigate('ShareView', { room: this.room, thread: this.thread, attachments });
|
||||
const { message, replyCancel, replyWithMention } = this.props;
|
||||
// Start a thread with an attachment
|
||||
let { thread } = this;
|
||||
if (replyWithMention) {
|
||||
thread = message;
|
||||
replyCancel();
|
||||
}
|
||||
Navigation.navigate('ShareView', { room: this.room, thread, attachments });
|
||||
}
|
||||
|
||||
createDiscussion = () => {
|
||||
|
|
|
@ -36,7 +36,7 @@ const styles = StyleSheet.create({
|
|||
|
||||
const Header = React.memo(({ room, thread, theme }) => {
|
||||
let type;
|
||||
if (thread?.tmid) {
|
||||
if (thread?.id) {
|
||||
type = 'thread';
|
||||
} else if (room?.prid) {
|
||||
type = 'discussion';
|
||||
|
|
|
@ -189,7 +189,7 @@ class ShareView extends Component {
|
|||
path,
|
||||
store: 'Uploads'
|
||||
},
|
||||
thread?.tmid,
|
||||
thread?.id,
|
||||
server,
|
||||
{ id: user.id, token: user.token }
|
||||
);
|
||||
|
@ -199,7 +199,7 @@ class ShareView extends Component {
|
|||
|
||||
// Send text message
|
||||
} else if (text.length) {
|
||||
await RocketChat.sendMessage(room.rid, text, thread?.tmid, { id: user.id, token: user.token });
|
||||
await RocketChat.sendMessage(room.rid, text, thread?.id, { id: user.id, token: user.token });
|
||||
}
|
||||
} catch {
|
||||
// Do nothing
|
||||
|
|
Loading…
Reference in New Issue