Adding lists

The streaming API supports lists: GET /api/v1/streaming/list with query param list. And all the end points for list management has also been documented. It'll be great!

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

Current status:

After creating a channel with topic X, the toots shown by timeline X are correctly shown in that new channel.

Sadly, the stream is not connected. It exists, because when a person in the right list deletes a status, I now get two messages telling me that the status has been deleted. But right now, toots by people in the list are still shown in the home timeline.


Well, I think it's done. It's officially in testing, now. :)

Tags: Closed

Reopen issue

Comments


This wiki uses a variant of Markdown.

To save this page you must answer this question:

Please write "new issue" into the field below.