add persist_user_denylist and persist_user_allowlist

Closes: #3511
This commit is contained in:
Luca Matei Pintilie
2025-11-28 21:54:38 +01:00
committed by mathieui
parent fdae7b03e0
commit fbb93dbd08
6 changed files with 170 additions and 3 deletions
+4 -1
View File
@@ -7,6 +7,7 @@
#include <utils/tolower.hpp>
#include <utils/uuid.hpp>
#include <logger/logger.hpp>
#include <utils/is_requester_allowed_to_persist.hpp>
#include <utils/revstr.hpp>
#include <utils/split.hpp>
#include <xmpp/jid.hpp>
@@ -499,7 +500,9 @@ void Bridge::leave_irc_channel(Iid&& iid, const std::string& status_message, con
bool persistent = false;
#ifdef USE_DATABASE
const auto goptions = Database::get_global_options(this->user_jid);
if (goptions.col<Database::GlobalPersistent>())
if (!utils::is_requester_allowed_to_persist(Jid(this->user_jid)))
persistent = false;
else if (goptions.col<Database::GlobalPersistent>())
persistent = true;
else
{