mirror of
https://github.com/revoltchat/revite.git
synced 2024-12-24 22:52:09 -05:00
feat: show message that user can't message another
This commit is contained in:
parent
fc8cfa5419
commit
df1b39256d
2 changed files with 21 additions and 9 deletions
|
@ -628,14 +628,26 @@ export default function ContextMenus() {
|
|||
});
|
||||
}
|
||||
|
||||
if (
|
||||
user._id !== userId &&
|
||||
userPermissions & UserPermission.SendMessage
|
||||
) {
|
||||
generateAction({
|
||||
action: "message_user",
|
||||
user,
|
||||
});
|
||||
if (user._id !== userId) {
|
||||
if (userPermissions & UserPermission.SendMessage) {
|
||||
generateAction({
|
||||
action: "message_user",
|
||||
user,
|
||||
});
|
||||
} else {
|
||||
elements.push(
|
||||
<MenuItem disabled={true}>
|
||||
<Tooltip
|
||||
content="Must be friends with this user to message them."
|
||||
placement="left"
|
||||
hideOnClick={false}>
|
||||
<Text
|
||||
id={`app.context_menu.message_user`}
|
||||
/>
|
||||
</Tooltip>
|
||||
</MenuItem>,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
for (let i = 0; i < actions.length; i++) {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
.preact-context-menu .context-menu {
|
||||
z-index: 10000;
|
||||
z-index: 9998;
|
||||
min-width: 190px;
|
||||
font-weight: 500;
|
||||
padding: 6px 8px;
|
||||
|
|
Loading…
Reference in a new issue