Archived
1
0
Fork 0

In globalchat filter messages without content

This commit is contained in:
niansa 2021-01-02 22:37:09 +01:00
parent e446f7166c
commit a25aa09b87

View file

@ -88,8 +88,8 @@ void on_message(CMessage msg, std::function<void (CMessage)> cb) {
cb(msg); cb(msg);
return; return;
} }
// Check if user is blacklisted // Check if message has no content or user is blacklisted
if (env.db->get(to_dbid(msg->author->id), "GC_BLACKLISTED", db_templates::user).as<bool>()) { if (msg->content.empty() or env.db->get(to_dbid(msg->author->id), "GC_BLACKLISTED", db_templates::user).as<bool>()) {
msg->remove(); msg->remove();
return; return;
} }