Add /api/v1/notifications/clear, non-existing link cards for statuses will
now return empty hash instead of throwing a 404 error. When following, merge into timeline will filter statuses
This commit is contained in:
		@@ -24,4 +24,9 @@ class Api::V1::NotificationsController < ApiController
 | 
			
		||||
  def show
 | 
			
		||||
    @notification = Notification.where(account: current_account).find(params[:id])
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  def clear
 | 
			
		||||
    Notification.where(account: current_account).delete_all
 | 
			
		||||
    render_empty
 | 
			
		||||
  end
 | 
			
		||||
end
 | 
			
		||||
 
 | 
			
		||||
@@ -22,7 +22,8 @@ class Api::V1::StatusesController < ApiController
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  def card
 | 
			
		||||
    @card = PreviewCard.find_by!(status: @status)
 | 
			
		||||
    @card = PreviewCard.find_by(status: @status)
 | 
			
		||||
    render_empty if @card.nil?
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  def reblogged_by
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user