If we haven't yet discovered all of a user's capabilities, calls fail. This leads to some horrific hacks in NMC's RequestChannel implementation. Calls made to a contact on the subscribe list whose capabilities we haven't fully worked out yet should instead be queued somehow, and either continue when we discover that they are capable of receiving calls, or fail when we discover they are not capable of receiving calls (or when some arbitrary timeout is reached).
This has been fixed for a while. If you call RequestStreams, and we don't know the contact's capable: * If we know we're waiting for a disco response, we wait (indefinitely) for that. * If we're still "unsure" we've got initial presences (also known as: we've been online at least 5 seconds), we wait 5 seconds and try again. * Else, return with NotAvailable. Ideally in the second case we'd wait 5 seconds, or until we get that contact's presence, whichever is the shorter. I thought that'd be easy to implement (by listening to presences-updated on the PresenceCache) but that signal is emitted just before the caps URI is processed and discos sent if necessary. I'm not sure if anything depends on that ordering, but it doesn't seem worth finding out. The reward isn't particularly compelling.
Created attachment 22596 [details] [review] Non-working patch to slightly improve this behaviour.
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.