Local username rules, mirrored from WhatsApp's
WAWebUsernameConstants and WAWebUsernameValidationUtils.
These are the same checks WhatsApp Web applies before it sends a username
query, so running them locally avoids a pointless round trip and, more
importantly, keeps "this username is malformed" distinguishable from "this
username does not exist" (WhatsApp reports both as an empty result).
Local username rules, mirrored from WhatsApp's
WAWebUsernameConstantsandWAWebUsernameValidationUtils.These are the same checks WhatsApp Web applies before it sends a username query, so running them locally avoids a pointless round trip and, more importantly, keeps "this username is malformed" distinguishable from "this username does not exist" (WhatsApp reports both as an empty result).