1
0
mirror of https://github.com/spacebarchat/client.git synced 2024-11-22 10:22:30 +01:00

fix issues with permissions

This commit is contained in:
Puyodead1 2023-08-31 23:07:23 -04:00
parent 18e50eae53
commit 76beb5463d
No known key found for this signature in database
GPG Key ID: BA5F91AAEF68E5CE
2 changed files with 2 additions and 2 deletions

View File

@ -68,7 +68,7 @@ function MessageInput(props: Props) {
React.useEffect(() => {
const permission = Permissions.getPermission(app.account!.id, props.guild, props.channel);
setCanSendMessages(permission.has("SEND_MESSAGES"));
}, []);
}, [props.channel, props.guild]);
const serialize = (value: Descendant[]) => {
return (

View File

@ -41,7 +41,7 @@ function MessageList({ guild, channel }: Props) {
React.useEffect(() => {
const permission = Permissions.getPermission(app.account!.id, guild, channel);
setCanView(permission.has("READ_MESSAGE_HISTORY"));
}, []);
}, [guild, channel]);
// handles the initial fetch of channel messages
React.useEffect(() => {