♻️ Changed referrer to home

Removed unnecessary async
This commit is contained in:
Wazbat 2023-07-01 03:13:16 +02:00
parent 703d7744a8
commit fd0641861b
3 changed files with 12 additions and 12 deletions

View file

@ -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 || {};

View file

@ -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({

View file

@ -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 }> = {};