From 6f130bb4f64e53f5f589828f8f522eb0dbe26cbc Mon Sep 17 00:00:00 2001 From: dimden Date: Fri, 8 Sep 2023 19:55:14 +0300 Subject: [PATCH] fix tweeting --- layouts/profile/script.js | 2 +- scripts/apis.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/layouts/profile/script.js b/layouts/profile/script.js index 75ad9b40..d1b29019 100644 --- a/layouts/profile/script.js +++ b/layouts/profile/script.js @@ -956,7 +956,7 @@ async function renderProfile() { if(pageUser.id_str === user.id_str) { if((pageUser.verified_type === "Blue" || pageUser.verified) && !localStorage.alwaysThinkUreNotBlueVerified) { localStorage.OTisBlueVerified = true; - } else if(localStorage.OTisBlueVerified) { + } else if(localStorage.OTisBlueVerified && localStorage.OTisBlueVerified !== "always") { delete localStorage.OTisBlueVerified; } buttonsElement.innerHTML = /*html*/` diff --git a/scripts/apis.js b/scripts/apis.js index 5311d513..402b4a39 100644 --- a/scripts/apis.js +++ b/scripts/apis.js @@ -2480,7 +2480,8 @@ const API = { if (data.errors && data.errors[0]) { return reject(data.errors[0].message); } - let result = data.data.create_tweet.tweet_results.result; + let ct = data.data.create_tweet ? data.data.create_tweet : data.data.notetweet_create; + let result = ct.tweet_results.result; let tweet = result.legacy; tweet.id_str = result.rest_id; tweet.user = result.core.user_results.result.legacy;