component AP Gateway: log invalid account in case of error.

This commit is contained in:
Goffi 2024-06-12 22:34:19 +02:00
commit f97ed65a7a

View file

@ -840,7 +840,7 @@ class APGateway:
@raise PermissionError: non local jid is used when gateway doesn't allow them
"""
if ap_account.count("@") != 1:
raise ValueError("Invalid AP account")
raise ValueError(f"Invalid AP account {ap_account!r}")
if ap_account.startswith("___"):
encoded = True
ap_account = ap_account[3:]