Skip to content

Services

phil/instant-messenger

MessengerType

A service is a case of an enum implementing MessengerType:

MethodGives
normalize(string $input): ?stringThe canonical handle the input stands for, or null when it is not one
display(string $handle): stringThe handle as people read it
link(string $handle): ?stringThe address that opens a conversation, or null

The international services

ServiceHandleRead fromLink
WhatsAppA phone number, +15145550123wa.me/…, api.whatsapp.com/send?phone=…https://wa.me/15145550123
TelegramA user name of 5 to 32 letters, digits and _, in lowercase@name, t.me/…, telegram.me/…; not Telegram's own pages, t.me/joinchat/…, t.me/addstickers/… and the likehttps://t.me/name, shown @name
SignalA phone number, or a user name name.01signal.me/#p/…https://signal.me/#p/+1… for a number; none for a user name
MessengerA Facebook user namem.me/…https://m.me/name
Matrix@user:servermatrix.to/#/…https://matrix.to/#/@user:server
Xmppuser@server, without ?, # or control charactersxmpp:…xmpp:user@server, the user percent-encoded as RFC 5122 writes it
ThreemaAn 8-character ID, in capitalsthreema.id/…https://threema.id/ID
ViberA phone number—viber://chat?number=…
LineAn ID of 4 to 20 characters; an official account's ID keeps its @~id, @id, line.me/ti/p/~…, line.me/R/ti/p/~… and …/@…; not a friend code, line.me/ti/p/AbCd…https://line.me/ti/p/~id; https://line.me/R/ti/p/@id for an official account
DiscordA user name of 2 to 32 characters@namenone, shown @name
WeChatAn ID of 6 to 20 characters, a letter first—none
IMessageA phone number, or an email address in lowercase—none
SnapchatA user name of 3 to 15 letters, digits, ., - and _, a letter first and a letter or digit last@name, snapchat.com/add/…https://www.snapchat.com/add/name
SessionA Session ID: 05 and 64 hexadecimal digits, in lowercase—none

A phone number is written internationally, with + and the country code; spaces, dots, dashes and parentheses are forgiven. phil/phone reads it: the number must exist in its country's numbering plan and carry no extension, and it is kept in E.164, +15145550123, and shown in the international format, +1 514-555-0123. label() gives the service's own name, XMPP, iMessage.

iMessage has no link: sms: opens the device's text messages, iMessage or not, and Apple publishes no address of its own.

Which services are here

A service is in KnownMessenger when it is used across countries and names its people itself, or by a phone number or an email address. Left out:

KindFor instanceWhy
Bound to a workspace or a serverSlack, Mattermost, Rocket.Chat, Microsoft TeamsA name means nothing without its workspace
A plain phone number or accountSMS, RCS, Google ChatA telephone or email field, not a service
A social networkInstagram, X, Bluesky, MastodonA profile, a URL kind rather than a handle
RegionalKakaoTalk, Zalo, QQThe application's own enum, beside KnownMessenger
Without handles, or closedSimpleX, SkypeNothing to store

An application's own services

A community forum, a regional network: an enum of the application's, implementing MessengerType, read and shown its own way. Fields and constraints accept it beside KnownMessenger.