Custom message routing

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

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
30/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
openapi, typescript

Direzione di ricerca

L'issue non indica file, test o punti di ingresso. Inizia esaminando i typings TypeScript e il generatore OpenAPI v3 del repository, quindi chiarisci come le route personalizzate e le relative regole di autorizzazione, immutabilità ed eliminazione si integrino con l'API. Il lavoro è completato quando il modello delle route e il comportamento del ciclo di vita sono specificati e implementati con validazione e copertura dei test.

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

Descrizione

enhancement
What do you want to see?

This could be useful for cross-posting and IoT-related use cases. Custom route management should be permissions-gated to prevent spamming by randomly creating message routes.

The semantics should be as follows: server-wide permissions allow you to create, alter and drop a message route targeting any channel, while per-guild permission only allows you to do so while requiring you to have either:

  • Posting, storage, view all within that guild
  • Posting channel is null (meaning that route is read-only) and view channel is within that guild, no constraints on storage channel

Routing rule

A routing rule shall consist of eight elements:

  • Timestamp of the registration (stored as snowflake)
  • Source channel
  • Storage channel
  • Sink channel
  • Source users (user, group or role ID)
  • Target users (user, group or role ID)
  • Valid since timestamp
  • Valid until timestamp

Invariants

  • Valid since cannot be earlier than time of registration
  • Valid until cannot be earlier than valid since
  • Source user set has to have message posting permission in the source channel at the time of use
  • Event type validity checks are done based on the storage channel
  • Target user set has to have read messages permission in the source channel at the time of use
  • Each routing rule is considered immutable once created, except for valid until timestamp, which can be set to any future time while the routing rule is still in effect

A routing rule can only be deleted in either of the following cases:

  • none of the source channels are present
  • none of the storage channels are present
  • none of the sink channels are present
  • the routing rule is not in effect AND no messages are affected by deletion of the routing rule
Lingua principale
TypeScript
Stelle
42
Fork
34
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Apri la guida per i contributori

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 stoatchat/javascript-client-api

Tutte le issue di stoatchat/javascript-client-api

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.