Skip to content

Commit

Permalink
Merge pull request #148 from pangeachat/dont-add-to-dms
Browse files Browse the repository at this point in the history
push don't add teachers to DMs or bot chat
  • Loading branch information
ggurdin authored Apr 19, 2024
2 parents 9501f6f + df17a8f commit 15d2eca
Show file tree
Hide file tree
Showing 2 changed files with 903 additions and 59 deletions.
4 changes: 3 additions & 1 deletion lib/pages/invitation_selection/invitation_selection.dart
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,9 @@ class InvitationSelectionController extends State<InvitationSelection> {
if (spaceChild.roomId == null) continue;
final spaceChildRoom =
Matrix.of(context).client.getRoomById(spaceChild.roomId!);
if (spaceChildRoom != null) {
if (spaceChildRoom != null &&
!(await spaceChildRoom.isBotDM) &&
!spaceChildRoom.isDirectChat) {
await spaceChildRoom.invite(id);
await spaceChildRoom.setPower(
id,
Expand Down
Loading

0 comments on commit 15d2eca

Please sign in to comment.