From dc54088deca9b8ee506426fa45862cd84d00f880 Mon Sep 17 00:00:00 2001 From: "me@ow.nekobit.net" Date: Fri, 6 May 2022 05:02:23 +0000 Subject: [PATCH] Fix search for tags FossilOrigin-Name: 8a3a5cf950f6c46652c9bb3f78321c3c5ddd4229722a95bafa6535386a415e80 --- include/mastodont_search.h | 3 ++- src/search.c | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/include/mastodont_search.h b/include/mastodont_search.h index c6f14c1..4592a75 100644 --- a/include/mastodont_search.h +++ b/include/mastodont_search.h @@ -46,7 +46,8 @@ struct mstdnt_search_results size_t accts_len; struct mstdnt_status* statuses; size_t statuses_len; - // TODO tags + struct mstdnt_tag* tags; + size_t tags_len; }; int mastodont_search(mastodont_t* data, diff --git a/src/search.c b/src/search.c index 9d3f6b0..4594818 100644 --- a/src/search.c +++ b/src/search.c @@ -54,9 +54,9 @@ int mstdnt_search_from_result(struct mstdnt_storage* storage, &(search_results->accts_len), accounts); - mstdnt_tags_json(&(search_results->accts), - &(search_results->accts_len), - accounts); + mstdnt_tags_json(&(search_results->tags), + &(search_results->tags_len), + hashtags); return 0; }