kensanata / bitlbee-mastodon

A Mastodon plugin for Bitlbee
https://alexschroeder.ch/software/Bitlbee_Mastodon
GNU General Public License v2.0
30 stars 7 forks source link

Adding lists for streaming #19

Closed kensanata closed 4 years ago

kensanata commented 6 years ago

Any volunteers? The streaming API supports lists: GET /api/v1/streaming/list with query param list.

Surely the simplest solution would be to handle lists exactly like hashtags. Thus, we start by copying the code that creates streams based on the channels we join and we distribute incoming messages depending on channel topic. We'll start by assuming that if it starts with # it's a hashtag, if it starts with @ it's a person, otherwise it's a list, maybe?

  1. in mastodon_chat_join we need to examine room in order to decide whether we want to call existing mastodon_hashtag_timeline or the new mastodon_list_timeline

  2. also, whether to call the existing mastodon_open_hashtag_stream or the new mastodon_open_list_stream

  3. we need to implement some list management commands in mastodon_handle_command, maybe create a list, delete a list, list the people in a list, add a person to a list and remove a person from a list

kensanata commented 4 years ago

I think this has been implemented a while ago.