metheus-governance-mcp-cli 0.2.88 → 0.2.89
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/bot-commands.mjs +17 -2
- package/package.json +1 -1
package/lib/bot-commands.mjs
CHANGED
|
@@ -748,9 +748,24 @@ async function editTelegramBotGuided(ui, parsed, selected, current, flags, deps)
|
|
|
748
748
|
let groupedServerName = "";
|
|
749
749
|
let serverManagedIdentity = Boolean(current.serverBotID || current.__preferServerIdentity);
|
|
750
750
|
if (!serverManagedIdentity) {
|
|
751
|
-
const
|
|
752
|
-
|
|
751
|
+
const initialBinding = await resolveTelegramServerBindingDetails(
|
|
752
|
+
{
|
|
753
|
+
serverBotID: current.serverBotID,
|
|
754
|
+
botUsername: current.username,
|
|
755
|
+
botKey: current.key,
|
|
756
|
+
roleProfile: current.roleProfile,
|
|
757
|
+
},
|
|
758
|
+
flags,
|
|
759
|
+
deps,
|
|
760
|
+
);
|
|
761
|
+
if (initialBinding.ok && (String(initialBinding.serverBotID || "").trim() || initialBinding.mode === "group")) {
|
|
753
762
|
serverManagedIdentity = true;
|
|
763
|
+
current.__preferServerIdentity = true;
|
|
764
|
+
if (initialBinding.mode === "single") {
|
|
765
|
+
current.serverBotID = String(initialBinding.serverBotID || "").trim();
|
|
766
|
+
current.roleProfile = String(initialBinding.role || current.roleProfile || "").trim();
|
|
767
|
+
applyRoleProfileDefaults(current, resolveRoleProfileDefaults(current.roleProfile, deps));
|
|
768
|
+
}
|
|
754
769
|
}
|
|
755
770
|
}
|
|
756
771
|
let usernameAction = "keep";
|