storage: Add a thread_id filter to history_get:
rel 457
This commit is contained in:
parent
931052f40c
commit
b2e64a9f03
1 changed files with 3 additions and 1 deletions
|
|
@ -665,6 +665,8 @@ class Storage:
|
|||
stmt = stmt.where(History.uid == filters["id"])
|
||||
if "origin_id" in filters:
|
||||
stmt = stmt.where(History.origin_id == filters["origin_id"])
|
||||
if "thread_id" in filters:
|
||||
stmt = stmt.where(Thread.thread_id == filters["thread_id"])
|
||||
|
||||
if limit is not None:
|
||||
stmt = stmt.limit(limit)
|
||||
|
|
@ -692,7 +694,7 @@ class Storage:
|
|||
if "thread" in data["extra"]:
|
||||
thread = Thread(
|
||||
thread_id=data["extra"]["thread"],
|
||||
parent_id=data["extra"].get["thread_parent"],
|
||||
parent_id=data["extra"].get("thread_parent"),
|
||||
)
|
||||
else:
|
||||
thread = None
|
||||
|
|
|
|||
Loading…
Reference in a new issue