mirror of
https://github.com/revoltchat/revite.git
synced 2024-12-25 15:12:08 -05:00
Merge pull request #266 from brecert/fix-265
This commit is contained in:
commit
ae2efcd9c6
1 changed files with 43 additions and 36 deletions
|
@ -486,8 +486,7 @@ function ContextMenus(props: Props) {
|
|||
elements.push(
|
||||
<MenuItem data={action} disabled={disabled}>
|
||||
<Text
|
||||
id={`app.context_menu.${
|
||||
locale ?? action.action
|
||||
id={`app.context_menu.${locale ?? action.action
|
||||
}`}
|
||||
/>
|
||||
{tip && <div className="tip">{tip}</div>}
|
||||
|
@ -702,19 +701,27 @@ function ContextMenus(props: Props) {
|
|||
}
|
||||
|
||||
if (message && !queued) {
|
||||
const sendPermission =
|
||||
message.channel &&
|
||||
message.channel.permission & ChannelPermission.SendMessage
|
||||
|
||||
if (sendPermission) {
|
||||
generateAction({
|
||||
action: "reply_message",
|
||||
target: message,
|
||||
});
|
||||
}
|
||||
|
||||
if (
|
||||
typeof message.content === "string" &&
|
||||
message.content.length > 0
|
||||
) {
|
||||
if (sendPermission) {
|
||||
generateAction({
|
||||
action: "quote_message",
|
||||
content: message.content,
|
||||
});
|
||||
}
|
||||
|
||||
generateAction({
|
||||
action: "copy_text",
|
||||
|
|
Loading…
Reference in a new issue