From 0968ef9bdd6a9d47edd7df498e4dd5e23f4a9a65 Mon Sep 17 00:00:00 2001 From: Archie Jaskowicz Date: Wed, 3 Apr 2024 12:55:44 +0100 Subject: [PATCH] fix: empty presences will now warn --- src/dpp/cluster.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/dpp/cluster.cpp b/src/dpp/cluster.cpp index 611c091da4..6966e70bb0 100644 --- a/src/dpp/cluster.cpp +++ b/src/dpp/cluster.cpp @@ -388,6 +388,11 @@ gateway::gateway(nlohmann::json* j) { } void cluster::set_presence(const dpp::presence &p) { + if(p.activities.empty()) { + log(ll_warning, "An empty presence was passed to set_presence."); + return; + } + json pres = p.to_json(); for (auto& s : shards) { if (s.second->is_connected()) {