(code: str, channel: Channel)
| 222 | |
| 223 | |
| 224 | async 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 | |
| 232 | async def _bound_elsewhere(code: str, channel: Channel) -> bool: |
no test coverage detected