Skip to content

Commit

Permalink
refine how to add the note property to an account node
Browse files Browse the repository at this point in the history
  • Loading branch information
judell committed Feb 26, 2023
1 parent 5b9eca8 commit 6216cc5
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions tagexplore.sp
Original file line number Diff line number Diff line change
Expand Up @@ -228,23 +228,18 @@ TagExplore
where
feed_link = 'https://mastodon.social/tags/' || $1 || '.rss'
limit $2
),
plus_note as (
select
account_url,
tag,
(select note from mastodon_search_account where query = account_url) as note
from
feed
)
select distinct on (account_url, tag)
jsonb_build_object(
'account_url', account_url,
'tag', tag,
'note', note
'note', case
when account_url is not null then (select note from mastodon_search_account where query = account_url)
else ''
end
) as account_url_tag_note
from
plus_note
feed
EOQ
}

Expand Down

0 comments on commit 6216cc5

Please sign in to comment.