MCPcopy Create free account
hub / github.com/Roy3838/Observer / _may_bind

Function _may_bind

api/remote.py:224–229  ·  view source on GitHub ↗
(code: str, channel: Channel)

Source from the content-addressed store, hash-verified

222
223
224async def _may_bind(code: str, channel: Channel) -> bool:
225 # Telegram: holding the code is enough. SMS/WhatsApp: the owner's QR must be open.
226 if channel == "telegram":
227 return True
228 r = await get_redis()
229 return bool(await r.exists(_pairing_key(code)))
230
231
232async def _bound_elsewhere(code: str, channel: Channel) -> bool:

Callers 1

route_inboundFunction · 0.85

Calls 2

get_redisFunction · 0.90
_pairing_keyFunction · 0.85

Tested by

no test coverage detected