pass the correct message id when there is an attachment on reply
This commit is contained in:
parent
58f73e1d09
commit
67ba3131e3
|
@ -3,6 +3,7 @@ import { StyleSheet, Text, View } from 'react-native';
|
|||
import moment from 'moment';
|
||||
import { dequal } from 'dequal';
|
||||
import FastImage from 'react-native-fast-image';
|
||||
import parse from 'url-parse';
|
||||
|
||||
import Touchable from './Touchable';
|
||||
import Markdown from '../markdown';
|
||||
|
@ -225,6 +226,12 @@ const Reply = React.memo(
|
|||
openLink(url, theme);
|
||||
};
|
||||
|
||||
let attachmentId = '';
|
||||
if (attachment.message_link) {
|
||||
const parsedUrl = parse(attachment.message_link, true);
|
||||
attachmentId = parsedUrl.query.msg || messageId;
|
||||
}
|
||||
|
||||
let { borderColor } = themes[theme];
|
||||
if (attachment.color) {
|
||||
borderColor = attachment.color;
|
||||
|
@ -257,7 +264,7 @@ const Reply = React.memo(
|
|||
timeFormat={timeFormat}
|
||||
style={[{ color: themes[theme].auxiliaryTintColor, fontSize: 14, marginBottom: 8 }]}
|
||||
isReply
|
||||
id={messageId}
|
||||
id={attachmentId}
|
||||
/>
|
||||
<Fields attachment={attachment} getCustomEmoji={getCustomEmoji} theme={theme} />
|
||||
{loading ? (
|
||||
|
|
Loading…
Reference in New Issue