Code-Society-Lab / Code-Society-Lab/matrixpy

Message: Add forward method

Open
#68 0 comments 0 reactions 0 assignees View on GitHub
good first issue
Dominant language
Python
Stars
14
Forks
7
Avg merge
8d 19h
Merged PRs (30d)
5

Description

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 .`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.