Skip to content

Conversation

Asraye
Copy link

@Asraye Asraye commented Aug 26, 2025

Meant to push the change to this, accidently opened a new PR (woops), adds strings for settings cog, and also adds a check for invite permissions

Please make sure to check the following tasks before opening and submitting a PR

  • I understand and have followed the contribution guide
  • I have tested my changes locally and they are working as intended

Comment on lines 329 to 338
// determine if user can edit channel (any relevant permission)
const canEditChannel = [
"ManageChannel",
"ManagePermissions",
"ManageWebhooks",
].some((perm) => props.channel.server?.havePermission(perm));

// user can create invites??
const canInvite = props.channel.server?.havePermission("InviteOthers");

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Solid.js components run once, so these should be in functions to be reactive afaik
i.e. () => yourCheck and then canInvite() where it is used

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated the channel permission and invite checks to use createMemo

@github-project-automation github-project-automation bot moved this from 🆕 Untriaged to 🛑 Changes requested in Pull Request Overview Aug 29, 2025
@insertish insertish moved this from 🛑 Changes requested to 🆕 Untriaged in Pull Request Overview Aug 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🆕 Untriaged
Development

Successfully merging this pull request may close these issues.

2 participants