about summary refs log tree commit diff
path: root/LibMatrix/Homeservers
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2025-03-15 18:33:49 +0100
committerRory& <root@rory.gay>2025-03-15 18:33:49 +0100
commit36648a023719061a999d8d5f4d2efc43f3dd15a5 (patch)
tree807c91c900a470a0bd61d24b4dda0f1fead163f1 /LibMatrix/Homeservers
parentAdd full invite data to invite handler callback (diff)
downloadLibMatrix-36648a023719061a999d8d5f4d2efc43f3dd15a5.tar.xz
Extend invite listener API
Diffstat (limited to 'LibMatrix/Homeservers')
-rw-r--r--LibMatrix/Homeservers/Extensions/NamedCaches/NamedFilterCache.cs10
1 files changed, 9 insertions, 1 deletions
diff --git a/LibMatrix/Homeservers/Extensions/NamedCaches/NamedFilterCache.cs b/LibMatrix/Homeservers/Extensions/NamedCaches/NamedFilterCache.cs

index 76533a4..e3c5943 100644 --- a/LibMatrix/Homeservers/Extensions/NamedCaches/NamedFilterCache.cs +++ b/LibMatrix/Homeservers/Extensions/NamedCaches/NamedFilterCache.cs
@@ -1,3 +1,5 @@ +using System.Text.Json.Nodes; +using ArcaneLibs.Extensions; using LibMatrix.Filters; using LibMatrix.Utilities; @@ -16,7 +18,13 @@ public class NamedFilterCache(AuthenticatedHomeserverGeneric hs) : NamedCache<st public async Task<string> GetOrSetValueAsync(string key, SyncFilter? filter = null) { var existingValue = await GetValueAsync(key); if (existingValue != null) { - return existingValue; + try { + var existingFilter = await hs.GetFilterAsync(existingValue); + return existingValue; + } + catch { + // ignored + } } if (filter is null) {