From 8115ee0c979355170a4a46cde3b69cd33a1fba4d Mon Sep 17 00:00:00 2001 From: a-f-G-U-C <65810997+a-f-G-U-C@users.noreply.github.com> Date: Tue, 2 Nov 2021 13:27:56 +0000 Subject: [PATCH] set Team field via Admin plugin --- src/plugins/AdminPlugin.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/plugins/AdminPlugin.cpp b/src/plugins/AdminPlugin.cpp index f642308da..01e54fadb 100644 --- a/src/plugins/AdminPlugin.cpp +++ b/src/plugins/AdminPlugin.cpp @@ -137,10 +137,15 @@ void AdminPlugin::handleSetOwner(const User &o) strcpy(owner.id, o.id); } if (owner.is_licensed != o.is_licensed) { - changed = true; + changed = 1; owner.is_licensed = o.is_licensed; } + if ((!changed || o.team) && (owner.team != o.team)) { + changed = 1; + owner.team = o.team; + } + if (changed) // If nothing really changed, don't broadcast on the network or write to flash service.reloadOwner(); }