diff --git a/src/components/messaging/MessageInput.tsx b/src/components/messaging/MessageInput.tsx index 643adaf..cbffb61 100644 --- a/src/components/messaging/MessageInput.tsx +++ b/src/components/messaging/MessageInput.tsx @@ -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 ( diff --git a/src/components/messaging/MessageList.tsx b/src/components/messaging/MessageList.tsx index 6a463bc..6d8da8c 100644 --- a/src/components/messaging/MessageList.tsx +++ b/src/components/messaging/MessageList.tsx @@ -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(() => {