forked from GNUsocial/gnu-social
		
	return a 409 Conflict when subscription already exists
This commit is contained in:
		@@ -263,6 +263,14 @@ class AtompubsubscriptionfeedAction extends ApiAuthAction
 | 
			
		||||
                return;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            if (Subscription::exists($this->_profile, $profile)) {
 | 
			
		||||
                // 409 Conflict
 | 
			
		||||
                $this->clientError(sprintf(_('Already subscribed to %s'),
 | 
			
		||||
                                           $person->id), 
 | 
			
		||||
                                   409);
 | 
			
		||||
                return;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            if (Subscription::start($this->_profile, $profile)) {
 | 
			
		||||
                $sub = Subscription::pkeyGet(array('subscriber' => $this->_profile->id,
 | 
			
		||||
                                                   'subscribed' => $profile->id));
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user