mirror of
https://github.com/CompeyDev/fxtwitter-docker.git
synced 2025-04-16 09:54:05 +01:00
Prettier and update fakeChromeVersion
This commit is contained in:
parent
fc5bc49a85
commit
87956c6759
4 changed files with 16 additions and 8 deletions
|
@ -102,11 +102,12 @@ const populateTweetProperties = async (
|
||||||
|
|
||||||
// Add Tweet source but remove the link HTML tag
|
// Add Tweet source but remove the link HTML tag
|
||||||
if (tweet.source) {
|
if (tweet.source) {
|
||||||
apiTweet.source = (tweet.source || '')
|
apiTweet.source = (tweet.source || '').replace(
|
||||||
.replace(/<a href="(.+?)" rel="nofollow">(.+?)<\/a>/, '$2')
|
/<a href="(.+?)" rel="nofollow">(.+?)<\/a>/,
|
||||||
|
'$2'
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Populate a Twitter card */
|
/* Populate a Twitter card */
|
||||||
if (tweet.card) {
|
if (tweet.card) {
|
||||||
const card = await renderCard(tweet.card);
|
const card = await renderCard(tweet.card);
|
||||||
|
@ -171,7 +172,9 @@ export const statusAPI = async (
|
||||||
typeof tweet.full_text === 'undefined' &&
|
typeof tweet.full_text === 'undefined' &&
|
||||||
conversation.timeline?.instructions?.length > 0
|
conversation.timeline?.instructions?.length > 0
|
||||||
) {
|
) {
|
||||||
console.log('Tweet could not be accessed with elongator, must be private/suspended');
|
console.log(
|
||||||
|
'Tweet could not be accessed with elongator, must be private/suspended'
|
||||||
|
);
|
||||||
return { code: 401, message: 'PRIVATE_TWEET' };
|
return { code: 401, message: 'PRIVATE_TWEET' };
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* We keep this value up-to-date for making our requests to Twitter as
|
/* We keep this value up-to-date for making our requests to Twitter as
|
||||||
indistinguishable from normal user traffic as possible. */
|
indistinguishable from normal user traffic as possible. */
|
||||||
const fakeChromeVersion = 111;
|
const fakeChromeVersion = 112;
|
||||||
const platformWindows = 'Windows NT 10.0; Win64; x64';
|
const platformWindows = 'Windows NT 10.0; Win64; x64';
|
||||||
const platformMac = 'Macintosh; Intel Mac OS X 10_15_7';
|
const platformMac = 'Macintosh; Intel Mac OS X 10_15_7';
|
||||||
const platformLinux = 'X11; Linux x86_64';
|
const platformLinux = 'X11; Linux x86_64';
|
||||||
|
|
7
src/types/env.d.ts
vendored
7
src/types/env.d.ts
vendored
|
@ -15,4 +15,9 @@ declare const RELEASE_NAME: string;
|
||||||
|
|
||||||
declare const TEST: boolean | undefined;
|
declare const TEST: boolean | undefined;
|
||||||
|
|
||||||
declare const TwitterProxy: { fetch: (input: RequestInfo<unknown, CfProperties<unknown>>, init?: RequestInit<RequestInitCfProperties> | undefined) => Promise<Response> };
|
declare const TwitterProxy: {
|
||||||
|
fetch: (
|
||||||
|
input: RequestInfo<unknown, CfProperties<unknown>>,
|
||||||
|
init?: RequestInit<RequestInitCfProperties> | undefined
|
||||||
|
) => Promise<Response>;
|
||||||
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue