about summary refs log tree commit diff
path: root/LibMatrix/RoomTypes
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2024-09-17 13:54:51 +0200
committerRory& <root@rory.gay>2024-09-17 13:54:51 +0200
commit1713936ce7a0811de8b2c3022cf08a63fc62b966 (patch)
tree49d9cfe2f0abadb7508b07cb2b2f7e3a7796f626 /LibMatrix/RoomTypes
parentFix room joining, power levels (diff)
downloadLibMatrix-github/dev/authenticated-media.tar.xz
Fix unit tests, add authenticated media github/dev/authenticated-media dev/authenticated-media
Diffstat (limited to 'LibMatrix/RoomTypes')
-rw-r--r--LibMatrix/RoomTypes/GenericRoom.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/LibMatrix/RoomTypes/GenericRoom.cs b/LibMatrix/RoomTypes/GenericRoom.cs

index 4641349..349ccb5 100644 --- a/LibMatrix/RoomTypes/GenericRoom.cs +++ b/LibMatrix/RoomTypes/GenericRoom.cs
@@ -379,7 +379,7 @@ public class GenericRoom { new UserIdAndReason { UserId = userId }); public async Task InviteUserAsync(string userId, string? reason = null, bool skipExisting = true) { - if (skipExisting && await GetStateAsync<RoomMemberEventContent>("m.room.member", userId) is not null) + if (skipExisting && await GetStateOrNullAsync<RoomMemberEventContent>("m.room.member", userId) is not null) return; await Homeserver.ClientHttpClient.PostAsJsonAsync($"/_matrix/client/v3/rooms/{RoomId}/invite", new UserIdAndReason(userId, reason)); }