core (memory/sqla): add id filter in history_get
This commit is contained in:
parent
70f3502429
commit
191d06126e
1 changed files with 2 additions and 0 deletions
|
|
@ -616,6 +616,8 @@ class Storage:
|
|||
if filters["last_stanza_id"] is not True or limit != 1:
|
||||
raise ValueError("Unexpected values for last_stanza_id filter")
|
||||
stmt = stmt.where(History.stanza_id.is_not(None))
|
||||
if "id" in filters:
|
||||
stmt = stmt.where(History.uid == filters["id"])
|
||||
if "origin_id" in filters:
|
||||
stmt = stmt.where(History.origin_id == filters["origin_id"])
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue