Fix hashtag search results (#576)

We mistakenly wrote to the key "hashtag" instead of "hashtags", resulting
in no results in the API response. Additionally, the type of the Tag's `history`
needs to be a list, not a dict.

This fixes hashtag search in Elk.
This commit is contained in:
Christof Dorner 2023-05-10 16:17:00 +00:00 committed by GitHub
parent 9775fa8991
commit b3b58df2b1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -275,7 +275,7 @@ class Notification(Schema):
class Tag(Schema):
name: str
url: str
history: dict
history: list
following: bool | None
@classmethod

View file

@ -39,7 +39,7 @@ def search(
for i in search_result["identities"]
]
if type is None or type == "hashtag":
result["hashtag"] = [
result["hashtags"] = [
schemas.Tag.from_hashtag(h) for h in search_result["hashtags"]
]
if type is None or type == "statuses":