For any non-self-handle, GetKnownAvatarTokens only returns the token if it is already known. For self-handle, it is required to know the token for the avatar if one is set, and only to omit the self-handle from the results if it's really unset. Clients are meant to rely on this special case to figure out whether they need to re-set the avatar on connect because your avatar doesn't persist between connections on the protocol in question. It seems awkward to use a side-effect of this method's surprising definition to figure this out. We might want to add RequestSelfAvatarToken, or add a flag saying that we have our own token.
The current behaviour is good enough, with some clarifications that have been made in the spec.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.