Commit 596446d1 authored by Serhat Seyren's avatar Serhat Seyren Committed by Tulir Asokan

Fix formatted phone number issue for pm command

(cherry picked from commit 5612330e)

Fixes #395
Closes #416
parent 578bc7cd
Pipeline #565 passed with stages
in 2 minutes and 30 seconds
......@@ -104,7 +104,8 @@ async def pm(evt: CommandEvent) -> EventID:
return await evt.reply("**Usage:** `$cmdprefix+sp pm <user identifier>`")
try:
user = await evt.sender.client.get_entity(evt.args[0])
id = "".join(evt.args).translate({ord(c):None for c in "+()- "})
user = await evt.sender.client.get_entity(id)
except ValueError:
return await evt.reply("Invalid user identifier or user not found.")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment