User lookup by ID fails #39
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Issue Summary
When attempting to call
get_users_by_id(), the call fails with a 400 error. This is due to a bug in the underlyingget_users()function, which attempts to get the first ID value from thenamesarray rather thanids, resulting in a request that looks like this:(where the second
id=is the first element in theidsarray)Steps to Reproduce
Create a
TwitchAPIConnectionand callget_users_by_id()with an array containing at least one valid id.Expected Behavior
The call should succeed and return information on the user.
Actual Behavior
The call returns an empty response due to a 400 error.
The fix is pretty simple - just change line 92 of api_connection.gd to call
ids.pop_back()rather thannames.pop_back().