diff --git a/prosody-modules/mod_muc_peertubelivechat_terms/mod_muc_peertubelivechat_terms.lua b/prosody-modules/mod_muc_peertubelivechat_terms/mod_muc_peertubelivechat_terms.lua index f45ffe82..7f271258 100644 --- a/prosody-modules/mod_muc_peertubelivechat_terms/mod_muc_peertubelivechat_terms.lua +++ b/prosody-modules/mod_muc_peertubelivechat_terms/mod_muc_peertubelivechat_terms.lua @@ -39,7 +39,9 @@ function get_muc_terms(room) end function set_muc_terms(room, terms) - terms = terms or nil; + if terms == "" then + terms = nil; + end if get_muc_terms(room) == terms then return false; end diff --git a/server/lib/room-channel/room-channel-class.ts b/server/lib/room-channel/room-channel-class.ts index 193d4323..3dbb1eef 100644 --- a/server/lib/room-channel/room-channel-class.ts +++ b/server/lib/room-channel/room-channel-class.ts @@ -356,7 +356,7 @@ class RoomChannel { // This can be done without waiting for the API call to finish, but we don't want to send thousands of // API calls at the same time. So storing data in a map, and we well launch it sequentially at the end prosodyRoomUpdates.set(roomJID, { - livechat_muc_terms: channelConfigurationOptions.terms + livechat_muc_terms: channelConfigurationOptions.terms ?? '' // must pass a string, else wont update }) this.roomConfToUpdate.delete(roomJID)