Creating a filter with the Mastodon API doesn't assign filter_id
When you create a filter by POST
ing to /api/v1/filters
, its filter_id
is left as NULL
/nil
. Among other things, this prevents SubwayTooter from being able to delete filters.
Suggested fix: either remove the filter_id
field from Filter
and use id
instead, or find some way to make sure filter_id
always gets set. The former is probably the better option though it will require checking that a user isn't trying to delete someone else's filters. The latter isn't great because then you have two candidate keys: id
and (user_id, filter_id)
, but it would be consistent with the way Mastodon treats filter id
s.
Edited by Lee Starnes