traewelling icon indicating copy to clipboard operation
traewelling copied to clipboard

Tweet Chaining

Open jeyemwey opened this issue 2 years ago • 3 comments

Is your feature request related to a problem? Please describe. As a Long Distance Träweller, I'd like to chain all tweets in a single thread on journeys with multiple legs. This way, it is clearer that I'm on one long trip rather than on multiple short ones.

Describe the solution you'd like During the checkin process, I'd like to have a toggle that enables this option. Träwelling should then find my last checkin and post the new checkin text as a reply to that tweet. If I have already started a thread off the first tweet (i.e. with pictures of the carriage), TRWL should append itself at the end of the chain.

Describe alternatives you've considered As a low-effort alternative, the generated tweet text can be shown so I can copy and paste it at the end of the thread manually.

Additional context / Solution Proposal This idea can contain multiple separate stories:

  1. Save the tweet id / url next to some train_checkin information.
  2. Implement logic to traverse to the end of the chain.
  3. Allow the post logic to be a reply.
  4. Deal with problems if the original tweet is deleted.
  5. Create a checkbox on the checkin flow.

NOTE: For the first iteration, this should only happen for Tweets, not Mastodon posts. Once the feature landed, we can recreate it in Mastodon later.

I'm happy to hear your thoughts about this!

jeyemwey avatar Sep 07 '22 11:09 jeyemwey

That sounds good and I would use that feature as well. 👍🏼

M4rcDev avatar Sep 07 '22 11:09 M4rcDev

Good Idea. Maybe this overlaps a bit with #769.

MrKrisKrisu avatar Sep 08 '22 09:09 MrKrisKrisu

I just spend my evening with the Twitter API. Because $things, the api doesn't give a great way to traverse a thread, but rather wants you to look through the answers individually. Given how all of this works, I'd like to mark this feature as beta, try it out but no warranty and make all wordings as cautious as possible.

That's how I believe the checkin flow could look like (you can download the PNG and upload it to draw.io:

Diagramm

And here's to a list of longer code snippets from the image:

  • $post_in_tweetchain && user()->statuses()->where("tweet_id", "!=", null)->exists()
  • /tweets?ids= --- $status_origin->tweet_id --- &tweet.fields=conversation_id
  • /tweets/search/recent mit query: 'conversation_id:$resp->conversation_id from:$twitter_acc_id to:$twitter_acc_id' und sort_order: 'recency'
  • $params = [ status="@$username " . $socialText, "in_reply_to_status_id" => $reply_id, "auto_populate_reply_metadata" => true ]. Please consult the Twitter API for any information.

If I find the time, I can implement this wizardary by myself, but I'm also happy if anyone else runs with it.

jeyemwey avatar Oct 08 '22 21:10 jeyemwey

Toot Chaining is implemented, Tweets from Träwelling have been deprecated. Closing for good.

jeyemwey avatar Mar 02 '23 12:03 jeyemwey