Code-Society-Lab / Code-Society-Lab/matrixpy
Message: Add forward method
- Lingua principale
- Python
- Stelle
- 14
- Fork
- 7
- Merge medio
- 8g 19h
- PR unite (30g)
- 5
Descrizione
There's no way to relay a message from one room to another. This is useful for bots that mirror announcements across rooms.
### Proposed API
```python
async def forward(self, room: Room) -> Message
```
### Example
```
target = bot.get_room("!other123:matrix.org")
await ctx.message.forward(target)
```
### Before opening a PR
- Write unit tests
- Run `mypy matrix/`
- Run `pytest tests/`
- Run `black .`
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia individuando la classe Message e i suoi metodi room-send o event esistenti, quindi leggi gli entry point del client Matrix che utilizzano. Aggiungi l’API async forward(room: Room) proposta, copri l’inoltro riuscito con unit test e verifica l’intera suite con mypy matrix/ e pytest tests/; esegui black . prima di inviare la modifica.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python
- Ambito
- api, backend
- Tipo di issue
- Funzionalità
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Tranquilla
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 72/100