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:
parent
18e50eae53
commit
76beb5463d
@ -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 (
|
||||
|
@ -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(() => {
|
||||
|
Loading…
Reference in New Issue
Block a user