Subscribe to hashtags, and Public pill for hashtags
Tasks
-
ssb-threads: hashtagCount(hashtag, cb)- new
asyncmuxrpc which delivers a number. Internally this can do a db query very similar tohashtagSummary, but usingcount()instead ofbatch()
- new
-
ssb-threads: hashtagSummaryto accept an array of hashtags- There's
opts.hashtag: string, maybe we could addopts.hashtags: Array<string> -
hashtags.tsfile has anoperator()method. This should now receive either string orArray<string> -
getMessagesByHashtagreceivers either string ofArray<string>. In the case of array, it should stream over the wholelevel, usinggte: null, lte: undefinedand usingpull.filter()to match our array of hashtags
- There's
-
frontend: Search screen header details for a hashtag - when a hashtag
#exampleis set on the Search, we should show a "Header" where there is left-aligned a text element "Nposts" and a right-aligned "Subscribe" button (similar to "Follow" button, it gets toggled as "Unsubscribe"). Callsssb.threads.hashtagCountto display the number
- when a hashtag
-
backend: dbUtils hashtagsSubscribed- new method which accumulates a
Set(or array) of hashtags subscribed to. Internally this is similar topreferredReactions - "subscribe" messages add to this Set
- "unsubscribe" messages remove from this Set
- new method which accumulates a
-
frontend: new "Hashtags" pill on the Public tab that will call ssb.threads.hashtagSummary()with an array of subscribed hashtags -
frontend: empty state when you select Hashtags pill but don't subscribe to any yet -
ssb-threads: hashtagUpdates -
frontend: flip ToggleButton visuals -
Test on Desktop -
Test on Android -
Test on iOS
Notes:
- "Subscribe" is an SSB message where msg.value.content is
{type:'channel', channel: hashtag, subscribed: true}- where
hashtagshould NOT have#
- "Unsubscribe" is an SSB message where msg.value.content is
{type:'channel', channel: hashtag, subscribed: false}- where
hashtagshoudl NOT have#
- Manyverse terminology for this concept is "Hashtag", not "Channel". Let's not use the word channel anywhere user-facing
Future tasks
- Unsubscribe/manage from many hashtags. Assume the user has 100+ hashtags subscribed to
- Explore new/trending hashtags
Edited by staltz