mirror of
https://github.com/CompeyDev/fxtwitter-docker.git
synced 2025-04-10 21:10:54 +01:00
🔥 Commented out verified functionality
This commit is contained in:
parent
6dcf8a1faf
commit
d664a3cfde
3 changed files with 6 additions and 3 deletions
|
@ -21,6 +21,7 @@ const populateUserProperties = async (
|
||||||
apiUser.screen_name = user.legacy.screen_name;
|
apiUser.screen_name = user.legacy.screen_name;
|
||||||
apiUser.description = user.legacy.description;
|
apiUser.description = user.legacy.description;
|
||||||
apiUser.location = user.legacy.location;
|
apiUser.location = user.legacy.location;
|
||||||
|
/*
|
||||||
if (user.is_blue_verified) {
|
if (user.is_blue_verified) {
|
||||||
apiUser.verified = 'blue';
|
apiUser.verified = 'blue';
|
||||||
} else if (user.legacy.verified) {
|
} else if (user.legacy.verified) {
|
||||||
|
@ -32,9 +33,11 @@ const populateUserProperties = async (
|
||||||
apiUser.verified = 'legacy';
|
apiUser.verified = 'legacy';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (apiUser.verified === 'government') {
|
if (apiUser.verified === 'government') {
|
||||||
apiUser.verified_label = user.affiliates_highlighted_label?.label?.description || '';
|
apiUser.verified_label = user.affiliates_highlighted_label?.label?.description || '';
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
apiUser.avatar_url = user.legacy.profile_image_url_https;
|
apiUser.avatar_url = user.legacy.profile_image_url_https;
|
||||||
apiUser.joined = user.legacy.created_at;
|
apiUser.joined = user.legacy.created_at;
|
||||||
if (user.legacy_extended_profile?.birthdate) {
|
if (user.legacy_extended_profile?.birthdate) {
|
||||||
|
|
4
src/types/types.d.ts
vendored
4
src/types/types.d.ts
vendored
|
@ -155,8 +155,8 @@ interface APIUser extends BaseUser {
|
||||||
location: string;
|
location: string;
|
||||||
url: string;
|
url: string;
|
||||||
protected: boolean;
|
protected: boolean;
|
||||||
verified: 'legacy' | 'blue'| 'business' | 'government';
|
// verified: 'legacy' | 'blue'| 'business' | 'government';
|
||||||
verified_label: string;
|
// verified_label: string;
|
||||||
followers: number;
|
followers: number;
|
||||||
following: number;
|
following: number;
|
||||||
tweets: number;
|
tweets: number;
|
||||||
|
|
|
@ -264,7 +264,7 @@ test('API fetch user', async () => {
|
||||||
// The official twitter account will never be following as many people as it has followers
|
// The official twitter account will never be following as many people as it has followers
|
||||||
expect(user.following).not.toEqual(user.followers);
|
expect(user.following).not.toEqual(user.followers);
|
||||||
expect(user.likes).toEqual(expect.any(Number));
|
expect(user.likes).toEqual(expect.any(Number));
|
||||||
expect(user.verified).toEqual('business');
|
// expect(user.verified).toEqual('business');
|
||||||
expect(user.joined).toEqual('Tue Feb 20 14:35:54 +0000 2007');
|
expect(user.joined).toEqual('Tue Feb 20 14:35:54 +0000 2007');
|
||||||
expect(user.birthday.day).toEqual(21);
|
expect(user.birthday.day).toEqual(21);
|
||||||
expect(user.birthday.month).toEqual(3);
|
expect(user.birthday.month).toEqual(3);
|
||||||
|
|
Loading…
Add table
Reference in a new issue