fix: edit and delete context menu items not showing up on your own messages caused by use of member uuid instead of user uuid comparison
All checks were successful
ci/woodpecker/push/build-and-publish Pipeline was successful
All checks were successful
ci/woodpecker/push/build-and-publish Pipeline was successful
This commit is contained in:
parent
5b0f358829
commit
d1f67d894d
1 changed files with 2 additions and 2 deletions
|
@ -149,12 +149,12 @@ const menuItems: ContextMenuItem[] = [
|
|||
]
|
||||
|
||||
console.log("me:", props.me);
|
||||
if (props.author?.uuid == props.me.uuid) {
|
||||
if (props.author?.user.uuid == props.me.uuid) {
|
||||
// Inserts "edit" option at index 1 (below the "reply" option)
|
||||
menuItems.splice(1, 0, { name: "Edit (WIP)", icon: "lucide:square-pen", type: "normal", callback: () => { /* if (messageElement.value) editMessage(messageElement.value, props) */ } });
|
||||
}
|
||||
|
||||
if (props.author?.uuid == props.me.uuid /* || check message delete permission*/) {
|
||||
if (props.author?.user.uuid == props.me.uuid /* || check message delete permission*/) {
|
||||
// Inserts "edit" option at index 2 (below the "edit" option)
|
||||
menuItems.splice(2, 0, { name: "Delete (WIP)", icon: "lucide:trash", type: "danger", callback: () => {} });
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue