mirror of
https://github.com/liamcottle/reticulum-meshchat.git
synced 2026-10-26 19:01:43 -04:00
filter announces by identity hash
This commit is contained in:
parent
5d8bf9fd55
commit
39d9b5bfc5
1 changed files with 5 additions and 0 deletions
|
|
@ -775,6 +775,7 @@ class ReticulumMeshChat:
|
|||
|
||||
# get query params
|
||||
aspect = request.query.get("aspect", None)
|
||||
identity_hash = request.query.get("identity_hash", None)
|
||||
limit = request.query.get("limit", None)
|
||||
|
||||
# build announces database query
|
||||
|
|
@ -784,6 +785,10 @@ class ReticulumMeshChat:
|
|||
if aspect is not None:
|
||||
query = query.where(database.Announce.aspect == aspect)
|
||||
|
||||
# filter by provided identity hash
|
||||
if identity_hash is not None:
|
||||
query = query.where(database.Announce.identity_hash == identity_hash)
|
||||
|
||||
# limit results
|
||||
if limit is not None:
|
||||
query = query.limit(limit)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue