fix(webui): refresh pairing prompts on gateway changes (#6401)

This commit is contained in:
chengyongru authored and GitHub committed 2026-10-25 20:16:51 +08:00
1 parent 9e9e22d331
commit 8af6313c56
26 files changed
+630 -82

No files matched your search

+5 -1
View File
@@ -939,8 +939,12 @@ async def cmd_goal(ctx: CommandContext) -> InboundMessage | OutboundMessage:
async def cmd_pairing(ctx: CommandContext) -> OutboundMessage:
"""List, approve, deny or revoke pairing requests."""
from nanobot.pairing import PAIRING_COMMAND_META_KEY, handle_pairing_command
from nanobot.pairing.events import PairingChanged
reply = handle_pairing_command(ctx.msg.channel, ctx.args)
def changed() -> None:
ctx.loop.bus.publish_nowait(PairingChanged())
reply = handle_pairing_command(ctx.msg.channel, ctx.args, on_change=changed)
return OutboundMessage(
channel=ctx.msg.channel,
chat_id=ctx.msg.chat_id,