diff --git a/app/containers/message/Attachments.tsx b/app/containers/message/Attachments.tsx index 79f329d19..cd5e3bb01 100644 --- a/app/containers/message/Attachments.tsx +++ b/app/containers/message/Attachments.tsx @@ -54,7 +54,7 @@ const AttachedActions = ({ attachment, getCustomEmoji }: { attachment: IAttachme }; const Attachments: React.FC = React.memo( - ({ attachments, timeFormat, showAttachment, style, getCustomEmoji, isReply, id }: IMessageAttachments) => { + ({ attachments, timeFormat, showAttachment, style, getCustomEmoji, isReply, id, author }: IMessageAttachments) => { const { theme } = useTheme(); if (!attachments || attachments.length === 0) { @@ -85,6 +85,7 @@ const Attachments: React.FC = React.memo( style={style} theme={theme} messageId={id} + author={author} /> ); } diff --git a/app/containers/message/Audio.tsx b/app/containers/message/Audio.tsx index bd47251c6..0915a4e47 100644 --- a/app/containers/message/Audio.tsx +++ b/app/containers/message/Audio.tsx @@ -18,7 +18,7 @@ import MessageContext from './Context'; import ActivityIndicator from '../ActivityIndicator'; import { withDimensions } from '../../dimensions'; import { TGetCustomEmoji } from '../../definitions/IEmoji'; -import { IAttachment } from '../../definitions'; +import { IAttachment, IUserMessage } from '../../definitions'; import { TSupportedThemes } from '../../theme'; import { downloadAudioFile, searchAudioFileAsync } from '../../lib/methods/audioFile'; import EventEmitter from '../../lib/methods/helpers/events'; @@ -42,6 +42,7 @@ interface IMessageAudioProps { getCustomEmoji: TGetCustomEmoji; scale?: number; messageId: string; + author?: IUserMessage; } interface IMessageAudioState { @@ -161,7 +162,8 @@ class MessageAudio extends React.Component { - const { messageId } = this.props; + const { messageId, author } = this.props; + const { user } = this.context; const url = this.getUrl(); try { if (url) { @@ -175,7 +177,8 @@ class MessageAudio extends React.Component void; getCustomEmoji: TGetCustomEmoji; id: string; + author?: IUserMessage; } export interface IMessageAvatar {