mirror of
https://github.com/revoltchat/revite.git
synced 2024-12-25 23:22:06 -05:00
Fixed sent attachments code
This commit is contained in:
parent
95a149407b
commit
7a8b12e15c
2 changed files with 28 additions and 38 deletions
|
@ -187,20 +187,15 @@ export const MessageReply = observer(({ index, channel, id }: Props) => {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}}>
|
}}>
|
||||||
{message.attachments &&
|
{message.attachments && (
|
||||||
message.attachments.length > 0 && (
|
<>
|
||||||
<>
|
<File size={16} />
|
||||||
<File size={16} />
|
<em>{message.attachments.length > 1 ?
|
||||||
<em>
|
<Text id="app.main.channel.misc.sent_multiple_files" /> :
|
||||||
{message.attachments.length >
|
<Text id="app.main.channel.misc.sent_file" /> }
|
||||||
0 ? (
|
</em>
|
||||||
<Text id="app.main.channel.misc.sent_multiple_files" />
|
</>
|
||||||
) : (
|
)}
|
||||||
<Text id="app.main.channel.misc.sent_file" />
|
|
||||||
)}
|
|
||||||
</em>
|
|
||||||
</>
|
|
||||||
)}
|
|
||||||
<Markdown
|
<Markdown
|
||||||
disallowBigEmoji
|
disallowBigEmoji
|
||||||
content={(
|
content={(
|
||||||
|
|
|
@ -112,30 +112,25 @@ export default observer(({ channel, replies, setReplies }: Props) => {
|
||||||
<UserShort user={message.author} size={16} />
|
<UserShort user={message.author} size={16} />
|
||||||
</div>
|
</div>
|
||||||
<div class="message">
|
<div class="message">
|
||||||
{message.attachments &&
|
{message.attachments && (
|
||||||
message.attachments.length > 0 && (
|
<>
|
||||||
<>
|
<File size={16} />
|
||||||
<File size={16} />
|
<em>{message.attachments.length > 1 ?
|
||||||
<em>
|
<Text id="app.main.channel.misc.sent_multiple_files" /> :
|
||||||
{message.attachments!.length >
|
<Text id="app.main.channel.misc.sent_file" /> }
|
||||||
1 ? (
|
</em>
|
||||||
<Text id="app.main.channel.misc.sent_multiple_files" />
|
</>
|
||||||
) : (
|
)}
|
||||||
<Text id="app.main.channel.misc.sent_file" />
|
{message.author_id === SYSTEM_USER_ID ? (
|
||||||
)}
|
<SystemMessage message={message} />
|
||||||
</em>
|
) : (
|
||||||
</>
|
<Markdown
|
||||||
)}
|
disallowBigEmoji
|
||||||
{message.author_id === SYSTEM_USER_ID ? (
|
content={(
|
||||||
<SystemMessage message={message} />
|
message.content as string
|
||||||
) : (
|
).replace(/\n/g, " ")}
|
||||||
<Markdown
|
/>
|
||||||
disallowBigEmoji
|
)}
|
||||||
content={(
|
|
||||||
message.content as string
|
|
||||||
).replace(/\n/g, " ")}
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
</ReplyBase>
|
</ReplyBase>
|
||||||
<span class="actions">
|
<span class="actions">
|
||||||
|
|
Loading…
Reference in a new issue