fix: parse verify credentials user id
CI / test (push) Successful in 9m59s
Publish npm package / publish (push) Failing after 5m12s

This commit is contained in:
2026-06-24 16:33:43 +09:00
parent ea7e5191b2
commit 7a036e244d
2 changed files with 27 additions and 5 deletions
+9 -5
View File
@@ -205,11 +205,15 @@ export function withUsers<TBase extends AbstractConstructor<TwitterClientBase>>(
? data.user_id
: typeof data?.user_id_str === 'string'
? data.user_id_str
: typeof data?.user?.id_str === 'string'
? data.user.id_str
: typeof data?.user?.id === 'string'
? data.user.id
: null;
: typeof data?.id_str === 'string'
? data.id_str
: typeof data?.id === 'string'
? data.id
: typeof data?.user?.id_str === 'string'
? data.user.id_str
: typeof data?.user?.id === 'string'
? data.user.id
: null;
if (username && userId) {
this.clientUserId = userId;