Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

URL previewing support #122

Merged
merged 5 commits into from
Apr 11, 2016
Merged

URL previewing support #122

merged 5 commits into from
Apr 11, 2016

Conversation

ara4n
Copy link
Member

@ara4n ara4n commented Apr 3, 2016

  • Add client.getUrlPreview() method to wrap the new /preview_url endpoint, which attempts to get a preview of a URL as of a given point in time.
  • Add a basic in-memory cache to avoid hammering synapse unnecessarily

This is part of a set of PRs spanning vector-web, matrix-react-sdk, matrix-js-sdk and synapse.
See also element-hq/element-web#1343 and matrix-org/matrix-react-sdk#260

* Caches results to prevent hammering the server.
* @param {string} url The URL to get preview data for
* @param {Number} ts The timestamp (ms since epoch) for querying
* historical preview data.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a bit vague. Not everyone should be expected to read the react-sdk source to figure out what it means. Can you clarify how it is meant to be used?

@richvdh richvdh assigned ara4n and unassigned richvdh Apr 4, 2016
@ara4n ara4n assigned richvdh and unassigned ara4n Apr 8, 2016
@ara4n
Copy link
Member Author

ara4n commented Apr 8, 2016

@richvdh PTAL

@richvdh
Copy link
Member

richvdh commented Apr 11, 2016

lgtm

@richvdh richvdh assigned ara4n and unassigned richvdh Apr 11, 2016
@ara4n ara4n merged commit 64b8047 into develop Apr 11, 2016
@t3chguy t3chguy deleted the matthew/preview_urls branch May 10, 2022 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants