diff --git a/meshchat.py b/meshchat.py index 75f49ab..7141182 100644 --- a/meshchat.py +++ b/meshchat.py @@ -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)