Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge PR #5917: FIX(client): Fix target and permission selection in u…
…pdateMenuPermissions This commit addresses two issues within the 'updateMenuPermissions' method: First, the target selection introduced in be7ad39 was suffering from the same problem as described in #3090 where selected tree items were not preferred for determining targets. This issue caused the chat bar to be erroneously disabled in certain situations, for example when connecting to a channel with "Text Message" permission disabled and switching to a different by left-clicking. The second issue is an oversight in 441d06f where the 'Use selected item as the chat bar target' option was introduced. The permission check in 'updateMenuPermissions' was not updated to take the new option into account and therefore always used the selected target for the permission query independent of the state of the option. The fix consists of using the unified 'getContextMenuTargets' for target selection and adding a special case for handling the enabled state of the chat bar by taking the new option into account. Fixes #1799
- Loading branch information