Hi! Is there any way in which I can check if I’ve already retweeted a tweet before retweeting it again?
I’m retrieving tweets using Client.search_recent_tweets(*), so I was wondering if I can add expansions = 'retweeted', but I don’t think is working. Do you know of any other way to achieve this using the new API? Thanks!

in the for loop
if(tweet.text.startsWith(“RT @”)) {
if(tweet.retweeted_status) {
tweetIDList.push(tweet.retweeted_status.id_str);
}
else {
tweetIDList.push(tweet.id_str);
}
}
else {
tweetIDList.push(tweet.id_str);
}

outside of the loop

/ Utility function - Gives unique elements from an array
function onlyUnique(value, index, self) {
return self.indexOf(value) === index;
}

// Get only unique entries
tweetIDList = tweetIDList.filter( onlyUnique )

There’s no such flag in the new Tweet model that indicates that, I’d assume since they’ve introduced the general “referenced_tweets” that include replies and quotes along with retweets the flag isn’t there. I’m hoping for a new object that denotes referenced_by_me and then return the reference type and tweet. But then that’d leave liked flag out of the model. I’d take it there are some modeling decisions that are holding back this feature, hopefully they’d come up with a solution for this soon, this and user-relationship status where you could know if a user is following another user or not.

I’m hopeful that all that will come out soon.