I believed that to get a handle of the form “@username@domain” from an actor object, I could just combine the preferredUsername and the host part of the id IRI, but I realized that this is not always the case. For example, in Mastodon, if you configure LOCAL_DOMAIN and WEB_DOMAIN differently, the handle can be “@username@domain” and the profile URL can be “sub.domain/@username”” at a time. #fedidev