mirror of
https://github.com/CompeyDev/fxtwitter-docker.git
synced 2025-04-14 08:55:20 +01:00
♻️ Changed referrer to home
Removed unnecessary async
This commit is contained in:
parent
703d7744a8
commit
fd0641861b
3 changed files with 12 additions and 12 deletions
|
@ -118,7 +118,7 @@ const populateTweetProperties = async (
|
||||||
/* Populate a Twitter card */
|
/* Populate a Twitter card */
|
||||||
|
|
||||||
if (tweet.card) {
|
if (tweet.card) {
|
||||||
const card = await renderCard(tweet.card);
|
const card = renderCard(tweet.card);
|
||||||
if (card.external_media) {
|
if (card.external_media) {
|
||||||
apiTweet.twitter_card = 'summary_large_image';
|
apiTweet.twitter_card = 'summary_large_image';
|
||||||
apiTweet.media = apiTweet.media || {};
|
apiTweet.media = apiTweet.media || {};
|
||||||
|
|
18
src/fetch.ts
18
src/fetch.ts
|
@ -201,15 +201,15 @@ export const fetchConversation = async (
|
||||||
}/i/api/graphql/TuC3CinYecrqAyqccUyFhw/TweetDetail?variables=${encodeURIComponent(
|
}/i/api/graphql/TuC3CinYecrqAyqccUyFhw/TweetDetail?variables=${encodeURIComponent(
|
||||||
JSON.stringify({
|
JSON.stringify({
|
||||||
focalTweetId: status,
|
focalTweetId: status,
|
||||||
referrer: 'messages',
|
referrer: 'home',
|
||||||
with_rux_injections:false,
|
with_rux_injections: false,
|
||||||
includePromotedContent:true,
|
includePromotedContent: true,
|
||||||
withCommunity:true,
|
withCommunity: true,
|
||||||
withQuickPromoteEligibilityTweetFields:true,
|
withQuickPromoteEligibilityTweetFields: true,
|
||||||
withArticleRichContent:false,
|
withArticleRichContent: false,
|
||||||
withBirdwatchNotes:true,
|
withBirdwatchNotes: true,
|
||||||
withVoice:true,
|
withVoice: true,
|
||||||
withV2Timeline:true
|
withV2Timeline: true
|
||||||
})
|
})
|
||||||
)}&features=${encodeURIComponent(
|
)}&features=${encodeURIComponent(
|
||||||
JSON.stringify({
|
JSON.stringify({
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import { calculateTimeLeftString } from './pollTime';
|
import { calculateTimeLeftString } from './pollTime';
|
||||||
|
|
||||||
/* Renders card for polls and non-Twitter video embeds (i.e. YouTube) */
|
/* Renders card for polls and non-Twitter video embeds (i.e. YouTube) */
|
||||||
export const renderCard = async (
|
export const renderCard = (
|
||||||
card: GraphQLTweet['card']
|
card: GraphQLTweet['card']
|
||||||
): Promise<{ poll?: APIPoll; external_media?: APIExternalMedia }> => {
|
): { poll?: APIPoll; external_media?: APIExternalMedia } => {
|
||||||
// We convert the binding_values array into an object with the legacy format
|
// We convert the binding_values array into an object with the legacy format
|
||||||
// TODO Clean this up
|
// TODO Clean this up
|
||||||
const binding_values: Record<string, { string_value?: string; boolean_value?: boolean }> = {};
|
const binding_values: Record<string, { string_value?: string; boolean_value?: boolean }> = {};
|
||||||
|
|
Loading…
Add table
Reference in a new issue