Closed Chronophylos closed 4 years ago
This took a bit more effort than normal. Twitch has inconsistent documentation on this behavior, but I figured out these inconsistencies and corrected.
Twitch says you'll get a GlobalUserState
if you send the Tags
capability. This is actually false. They send GlobalUserState
if you send Commands
and atleast one other capability. If you send Commands
and Membership
but not Tags
you'll, surprisingly, get a GlobalUserState
without any Tags
attached.
Some fun things: sending Commands
alone doesn't trigger this. Neither does sending Tags
and Membership
sans Commands
. I ended up figuring out which permutations cause this and handle it.
If you send just Tags
this crate will give you a Basic identity with tags
flagged -- which may be unexpected but everything else should just work.
The changes are in 0.14.1. I noticed you're on 0.13.0 (because of no unwrap on Connector::twitch()
). The only real public changes between 0.13.0 and 0.14.0 (and subseq. 0.14.1) is just handling the error returned by the 'twitch' method.
Previously DNS resolution could fail and that would panic. I had to bump the semver because that very public function really needed to return a result.
I was using 0.14.0. See #211
I'm trying to connect by only setting
Capability::Tags
.The log when I try to run the following code:
It hangs at this point and does not continue.
This is the code I used:
When I remove the
.capabilities(&[Capability::Tags])
line or use.anonymous()
instead of providing a name and token it works: