Skip to content
Snippets Groups Projects

Resolve "Review tasks"

Merged Jonathan Weth requested to merge 8-review-tasks into master
1 unresolved thread
2 files
+ 6
5
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -152,10 +152,11 @@ class MatrixRoom(ExtensiblePolymorphicModel):
def get_members(self) -> list[str]:
"""Get all members of this room."""
r = do_matrix_request(
"GET", f"rooms/{self.room_id}/members", body={"membership": ["join", "invite"]}
)
return [m["state_key"] for m in r["chunk"]]
r = do_matrix_request("GET", f"rooms/{self.room_id}/members")
return [
m["state_key"]
for m in filter(lambda c: c["content"]["membership"] in ("join", "invite"), r["chunk"])
]
def _invite(self, profile: MatrixProfile) -> dict[str, Any]:
"""Invite a user to this room."""
Loading