From 1713936ce7a0811de8b2c3022cf08a63fc62b966 Mon Sep 17 00:00:00 2001 From: Rory& Date: Tue, 17 Sep 2024 13:54:51 +0200 Subject: Fix unit tests, add authenticated media --- LibMatrix/RoomTypes/GenericRoom.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'LibMatrix/RoomTypes') 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("m.room.member", userId) is not null) + if (skipExisting && await GetStateOrNullAsync("m.room.member", userId) is not null) return; await Homeserver.ClientHttpClient.PostAsJsonAsync($"/_matrix/client/v3/rooms/{RoomId}/invite", new UserIdAndReason(userId, reason)); } -- cgit 1.4.1