dispatch(fetchStatusCardRequest(id));
api(getState).get(`/api/v1/statuses/${id}/card`).then(response => {
- dispatch(fetchStatusCardSuccess(id, response.data));
- }).catch(error => {
- if (error.response.status === 404) {
- // This is fine
+ if (response.data.length === 0) {
return;
}
+ dispatch(fetchStatusCardSuccess(id, response.data));
+ }).catch(error => {
dispatch(fetchStatusCardFail(id, error));
});
};
timeline_key = key(:home, into_account.id)
from_account.statuses.limit(MAX_ITEMS).each do |status|
+ next if filter?(:home, status, into_account)
redis.zadd(timeline_key, status.id, status.id)
end
get '/timelines/public', to: 'timelines#public', as: :public_timeline
get '/timelines/tag/:id', to: 'timelines#tag', as: :hashtag_timeline
- resources :follows, only: [:create]
- resources :media, only: [:create]
- resources :apps, only: [:create]
- resources :blocks, only: [:index]
+ resources :follows, only: [:create]
+ resources :media, only: [:create]
+ resources :apps, only: [:create]
+ resources :blocks, only: [:index]
+ resources :favourites, only: [:index]
resources :follow_requests, only: [:index] do
member do
end
end
- resources :notifications, only: [:index, :show]
- resources :favourites, only: [:index]
+ resources :notifications, only: [:index, :show] do
+ collection do
+ post :clear
+ end
+ end
resources :accounts, only: [:show] do
collection do