Room: Add leave method

Open Beginner friendly
#75 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
75/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Quiet
Tech stack
python
Domain
api

Research direction

Locate the Room class and inspect the existing methods that perform room actions to follow their patterns. Add the proposed async Room.leave() API, write unit tests under tests/, then run pytest tests/, mypy matrix/, and black .; done means await room.leave() works and the tests pass.

Written by the indexing model from the issue text.

Description

good first issue

The bot currently has no way to leave a room at runtime. This is a common need, a bot may join a room temporarily, or be invited to one it should decline after inspecting. Room.leave() fills this gap and follows the exact same existing patterns.

Proposed API
async def leave(self) -> None
Example
await room.leave()
Before opening a PR
  • Write unit tests
  • Run mypy matrix/
  • Run pytest tests/
  • Run black .
Dominant language
Python
Stars
14
Forks
7
Avg merge
8d 19h
Merged PRs (30d)
5

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Code-Society-Lab/matrixpy

All issues in Code-Society-Lab/matrixpy

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.