diff options
author | Rory& <root@rory.gay> | 2024-09-17 13:54:51 +0200 |
---|---|---|
committer | Rory& <root@rory.gay> | 2024-09-17 13:54:51 +0200 |
commit | 1713936ce7a0811de8b2c3022cf08a63fc62b966 (patch) | |
tree | 49d9cfe2f0abadb7508b07cb2b2f7e3a7796f626 /LibMatrix/RoomTypes | |
parent | Fix room joining, power levels (diff) | |
download | LibMatrix-dev/authenticated-media.tar.xz |
Fix unit tests, add authenticated media dev/authenticated-media
Diffstat (limited to 'LibMatrix/RoomTypes')
-rw-r--r-- | LibMatrix/RoomTypes/GenericRoom.cs | 2 |
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)); } |