fix: 🐛 Make LinkPreview an array

This commit is contained in:
Gaspard Wierzbinski 2024-08-28 18:02:05 +02:00 committed by GitHub
parent 938073110d
commit 505642264a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -63,7 +63,7 @@ Notes represent a piece of content on a Versia instance. They can be posted by [
<Property name="mentions" type="URI[]" required={false} typeLink="/types#uri"> <Property name="mentions" type="URI[]" required={false} typeLink="/types#uri">
URIs of [Users](/entities/user) that should be notified of the note. Similar to Twitter's `@` mentions. The note may also contain mentions in the content, however only the mentions in this field should trigger notifications. URIs of [Users](/entities/user) that should be notified of the note. Similar to Twitter's `@` mentions. The note may also contain mentions in the content, however only the mentions in this field should trigger notifications.
</Property> </Property>
<Property name="previews" type="LinkPreview" required={false}> <Property name="previews" type="LinkPreview[]" required={false}>
Previews for any links in the publication. This is to avoid the [stampeding mastodon problem](https://github.com/mastodon/mastodon/issues/23662) where a link preview is fetched by every instance that sees the publication, creating an accidental DDOS attack. Previews for any links in the publication. This is to avoid the [stampeding mastodon problem](https://github.com/mastodon/mastodon/issues/23662) where a link preview is fetched by every instance that sees the publication, creating an accidental DDOS attack.
```typescript ```typescript
@ -152,4 +152,4 @@ Notes represent a piece of content on a Versia instance. They can be posted by [
``` ```
</Col> </Col>
</Row> </Row>