Add configurable autoproxy latch timeout

This commit is contained in:
spiral
2020-11-20 19:44:15 -05:00
parent 37294b68da
commit 8e5fb6520b
8 changed files with 70 additions and 10 deletions

View File

@@ -25,5 +25,6 @@ namespace PluralKit.Core
public string? SystemTag { get; }
public string? SystemAvatar { get; }
public bool AllowAutoproxy { get; }
public int LatchTimeout { get; }
}
}

View File

@@ -15,7 +15,8 @@
last_switch_timestamp timestamp,
system_tag text,
system_avatar text,
allow_autoproxy bool
allow_autoproxy bool,
latch_timeout integer
)
as $$
-- CTEs to query "static" (accessible only through args) data
@@ -39,7 +40,8 @@ as $$
system_last_switch.timestamp as last_switch_timestamp,
system.tag as system_tag,
system.avatar_url as system_avatar,
system.account_autoproxy as allow_autoproxy
system.account_autoproxy as allow_autoproxy,
system.latch_timeout as latch_timeout
-- We need a "from" clause, so we just use some bogus data that's always present
-- This ensure we always have exactly one row going forward, so we can left join afterwards and still get data
from (select 1) as _placeholder