From a0c9c3fbcb18812488cc7e5a0f3efa1b6999d89f Mon Sep 17 00:00:00 2001 From: Marcel <79279756+aofn@users.noreply.github.com> Date: Tue, 5 Dec 2023 17:32:52 +0100 Subject: [PATCH] fix: sending actual object to change join rule instead of empty object --- pages/explore/manage-room/ChangeJoinRule.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pages/explore/manage-room/ChangeJoinRule.js b/pages/explore/manage-room/ChangeJoinRule.js index 1f74eb51..5bb3d3cd 100644 --- a/pages/explore/manage-room/ChangeJoinRule.js +++ b/pages/explore/manage-room/ChangeJoinRule.js @@ -28,7 +28,7 @@ const JoinRuleChanger = ({ roomId, roomName, onCancel }) => { const handleChangeJoinRule = async (e) => { e.preventDefault(); setChangingJoinRule(true); - await matrixClient.sendStateEvent(roomId, 'm.room.join_rules', {}, { join_rule: joinRule }) + await matrixClient.sendStateEvent(roomId, 'm.room.join_rules', { join_rule: joinRule }) .catch((error) => { setErrorMessage(error.data?.error); setJoinRule(currentJoinRule); @@ -36,6 +36,8 @@ const JoinRuleChanger = ({ roomId, roomName, onCancel }) => { setChangingJoinRule(false); }; + console.log(joinRule); + return (