Skip to content

Get image and height for Twitter images #2345

Ben requested to merge feat/twitter-sync-dims-2345 into master

Ticket(s) / Related Merge Requests

Summary of Changes

As we cannot yet get Twitter Videos until they release the video links to the V2 API - this change is different to the original issue card, and seeks to:

  • Set dimensions on Twitter images
  • Strip the media URL from the text of Twitter videos.
  • Improve how media metadata is handled to ease the transition to native videos when we can directly grab them.

Testing Considerations

**REQUIRES K8S CLUSTER ACCESS **

  1. Make a new Twitter account or use an existing one you don't mind spamming with posts.

  2. Go to /settings/other/twitter-sync.

  3. Follow the flow to set up Twitter sync.

  4. None of the above is within scope of these changes - any issues, DM me and I will help you get set up.

  5. On Twitter, make:

  • Rich embed.
  • Rich embed with text.
  • Text post.
  • Text post with emojis.
  • Image post.
  • Image post with text.
  • Video post. CHOOSE A SMALL SIZED VIDEO.
  • Video post with text. CHOOSE A SMALL SIZED VIDEO.
  1. Wait a couple of minutes to ensure Twitter has indexed everything properly
  2. exec into the pod, and run the sync command by CLI
kubectl exec -it feat-twitter-sync-dims-2345-minds-engine-sandbox-7d9b4b8f4zc2p2 sh
cd engine
php cli.php TwitterSync sync
  1. Check posts were mirrored to your channel. ORDER OF POSTS IS NOT ANYTHING TO DO WITH THIS CHANGE.
  2. Videos should not have the URL in the post message.
  3. Going to an images single entity page, and looking for the call to api/v2/entities on load, you should see width and height was saved.

Deployment Considerations

Needs to go to the runner responsible for TwitterSync.

Regression Scope

Effects TwitterSync

Platform Affected (web, mobile, etc

TwitterSync runner

Developer Testing Completed

Manual and unit

Screenshots / Screen Recording

https://streamable.com/uply95

image

Does this impact

  • Localization
  • Dark/light mode
  • Guest mode

Definition of Done Checklist

  • The Acceptance Criteria has been met
  • Code is tested: Testing includes unit/spec, E2E/automated and manual testing
  • Merge requests description has been filled out
Edited by Ben

Merge request reports