Skip to content

Commit e57f1b1

Browse files
committed
Hide rooms and users when adding to personal filtering community
1 parent 034b69b commit e57f1b1

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

mautrix/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
__version__ = "0.4.0"
1+
__version__ = "0.4.1"
22
__author__ = "Tulir Asokan <[email protected]>"
33
__all__ = ["api", "appservice", "bridge", "client", "errors", "util", "types"]

mautrix/bridge/_community.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ async def join(self, community_id: CommunityID, intent: IntentAPI) -> bool:
5858
await intent.ensure_registered()
5959
await self.invite(community_id, intent.mxid)
6060
try:
61-
await intent.api.request(Method.PUT, Path.groups[community_id].self.accept_invite)
61+
await intent.api.request(Method.PUT, Path.groups[community_id].self.accept_invite,
62+
{"m.visibility": {"type": "private"}})
6263
except MatrixStandardRequestError as e:
6364
intent.log.warning(f"Failed to join {community_id}: {e}")
6465
return True
@@ -68,7 +69,8 @@ async def add_room(self, community_id: CommunityID, room_id: RoomID) -> bool:
6869
return False
6970
try:
7071
await self.az.intent.api.request(Method.PUT,
71-
Path.groups[community_id].admin.rooms[room_id])
72+
Path.groups[community_id].admin.rooms[room_id],
73+
{"m.visibility": {"type": "private"}})
7274
except MatrixStandardRequestError as e:
7375
self.az.intent.log.warning(f"Failed to add {room_id} to {community_id}: {e}")
7476
return True

0 commit comments

Comments
 (0)