mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-12 08:40:11 +00:00
Restrict proxy conflict checking to the same system
This commit is contained in:
parent
9424e50187
commit
42b9b4f08e
1 changed files with 1 additions and 1 deletions
|
|
@ -34,7 +34,7 @@ namespace PluralKit.Bot
|
||||||
{
|
{
|
||||||
var query = "select * from (select *, (unnest(proxy_tags)).prefix as prefix, (unnest(proxy_tags)).suffix as suffix from members where system = @System) as _ where prefix = @Prefix and suffix = @Suffix and id != @Existing";
|
var query = "select * from (select *, (unnest(proxy_tags)).prefix as prefix, (unnest(proxy_tags)).suffix as suffix from members where system = @System) as _ where prefix = @Prefix and suffix = @Suffix and id != @Existing";
|
||||||
var conflicts = (await _db.Execute(conn => conn.QueryAsync<PKMember>(query,
|
var conflicts = (await _db.Execute(conn => conn.QueryAsync<PKMember>(query,
|
||||||
new {Prefix = newTag.Prefix, Suffix = newTag.Suffix, Existing = target.Id}))).ToList();
|
new {Prefix = newTag.Prefix, Suffix = newTag.Suffix, Existing = target.Id, system = target.System}))).ToList();
|
||||||
|
|
||||||
if (conflicts.Count <= 0) return true;
|
if (conflicts.Count <= 0) return true;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue