Support text on URL posts

Aperta
#297 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
66/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
typescript
Ambito
api

Direzione di ricerca

Start by reading SubmitPostOptions and the LinksAndComments.Submit SubmitRequest description in @devvit/reddit 0.15.0. Trace how reddit.submitPost builds and sends link submissions, then check the relevant type and API tests. Done when a link post accepts body text and the request carries it through, with tests covering the behavior.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Reddit’s public API lets a link post carry body text: POST /api/submit with kind=link, url and text. Devvit’s reddit.submitPost does not. Apps moving from PRAW or the Data API to Devvit lose this feature.

Example of a post with both: https://www.reddit.com/r/GlobalOffensive/comments/1xcxfv2/counterstrike_2_update_for_10222026/

Current behaviour (@devvit/reddit 0.15.0)

In SubmitPostOptions, the link variant is SubmitLinkOptions & { richtext?: never; text?: never; kind?: never }. TypeScript rejects any attempt to pass a body with a url.
The LinksAndComments.Submit API description (SubmitRequest) documents text and richtextJson as “Only used if kind is set to “self””. A body sent with kind: "link" therefore seems to be ignored even if the types are bypassed.

Lingua principale
TypeScript
Stelle
217
Fork
89
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di reddit/devvit

Tutte le issue di reddit/devvit

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.