mirror of
https://github.com/MarekWo/mc-webui.git
synced 2026-05-02 19:42:38 +02:00
fix(paths): use correct type=2 for repeater contacts
Type 1 is COM (companion), type 2 is REP (repeater). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -883,14 +883,14 @@ class Database:
|
||||
return bool(row['no_auto_flood']) if row and row['no_auto_flood'] else False
|
||||
|
||||
def get_repeater_contacts(self) -> List[Dict]:
|
||||
"""Get all repeater contacts (type=1) from DB, including ignored ones."""
|
||||
"""Get all repeater contacts (type=2) from DB, including ignored ones."""
|
||||
with self._connect() as conn:
|
||||
rows = conn.execute(
|
||||
"""SELECT c.public_key, c.name, c.last_advert, c.adv_lat, c.adv_lon,
|
||||
CASE WHEN ic.public_key IS NOT NULL THEN 1 ELSE 0 END AS is_ignored
|
||||
FROM contacts c
|
||||
LEFT JOIN ignored_contacts ic ON c.public_key = ic.public_key
|
||||
WHERE c.type = 1
|
||||
WHERE c.type = 2
|
||||
ORDER BY c.name ASC"""
|
||||
).fetchall()
|
||||
return [dict(r) for r in rows]
|
||||
|
||||
Reference in New Issue
Block a user