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.
pull/561/head^2
Christof Dorner 2023-05-10 16:17:00 +00:00 zatwierdzone przez GitHub
rodzic 9775fa8991
commit b3b58df2b1
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
2 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

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

Wyświetl plik

@ -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":