mirror of
https://github.com/jkingsman/Remote-Terminal-for-MeshCore.git
synced 2026-05-10 07:15:09 +02:00
Reject repeaters from contact telemetry opt-in
This commit is contained in:
@@ -475,10 +475,15 @@ async def toggle_tracked_telemetry_contact(
|
||||
),
|
||||
)
|
||||
|
||||
# Validate contact exists
|
||||
# Validate contact exists and is not a repeater (repeaters use tracked_telemetry_repeaters)
|
||||
contact = await ContactRepository.get_by_key(key)
|
||||
if not contact:
|
||||
raise HTTPException(status_code=404, detail="Contact not found")
|
||||
if contact.type == CONTACT_TYPE_REPEATER:
|
||||
raise HTTPException(
|
||||
status_code=400,
|
||||
detail="Repeaters use the dedicated repeater telemetry tracking list",
|
||||
)
|
||||
|
||||
if len(current) >= MAX_TRACKED_TELEMETRY_CONTACTS:
|
||||
names = await _resolve_names(current)
|
||||
|
||||
Reference in New Issue
Block a user