forked from grumpydevelop/federator
		
	remove debug/todos for live tests
This commit is contained in:
		
							parent
							
								
									8ea9bdcf9a
								
							
						
					
					
						commit
						ce7aa5c72d
					
				
					 5 changed files with 4 additions and 15 deletions
				
			
		| 
						 | 
				
			
			@ -156,12 +156,6 @@ class FedUsers implements APIInterface
 | 
			
		|||
            'type' => $user->type
 | 
			
		||||
        ];
 | 
			
		||||
        $this->response = $this->main->renderTemplate('user.json', $data);
 | 
			
		||||
        // todo remove HTTP again
 | 
			
		||||
        $this->response = str_replace(
 | 
			
		||||
            'https://192.168.178.143/',
 | 
			
		||||
            'http://192.168.178.143/',
 | 
			
		||||
            $this->response
 | 
			
		||||
        );
 | 
			
		||||
        return true;
 | 
			
		||||
    }
 | 
			
		||||
    /**
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -84,7 +84,7 @@ class Outbox implements \Federator\Api\FedUsers\FedUsersInterface
 | 
			
		|||
            $outbox->setPrev($id . '&min=' . $oldestId);
 | 
			
		||||
        }
 | 
			
		||||
        $obj = $outbox->toObject();
 | 
			
		||||
        return json_encode($obj, JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT); // todo remove pretty
 | 
			
		||||
        return json_encode($obj);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -129,7 +129,7 @@ class NewContent implements \Federator\Api\APIInterface
 | 
			
		|||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if (empty($users)) { // todo remove, debugging for now
 | 
			
		||||
        if (empty($users)) { // todo remove after proper implementation, debugging for now
 | 
			
		||||
            $rootDir = $_SERVER['DOCUMENT_ROOT'] . '../';
 | 
			
		||||
            // Save the raw input and parsed JSON to a file for inspection
 | 
			
		||||
            file_put_contents(
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -67,12 +67,6 @@ class WebFinger
 | 
			
		|||
            'domain' => $domain,
 | 
			
		||||
        ];
 | 
			
		||||
        $response = $this->main->renderTemplate('webfinger_acct.json', $data);
 | 
			
		||||
        // todo remove HTTP again
 | 
			
		||||
        $response = str_replace(
 | 
			
		||||
            'https://192.168.178.143',
 | 
			
		||||
            'http://192.168.178.143',
 | 
			
		||||
            $response
 | 
			
		||||
        );
 | 
			
		||||
        $this->wellKnown->setResponse($response);
 | 
			
		||||
        return true;
 | 
			
		||||
    }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -58,10 +58,11 @@ class ContentNation implements Connector
 | 
			
		|||
     */
 | 
			
		||||
    public function getRemoteFollowersOfUser($userId)
 | 
			
		||||
    {
 | 
			
		||||
        // todo implement queue for this, move to DIO
 | 
			
		||||
        if (preg_match("#^([^@]+)@([^/]+)#", $userId, $matches) == 1) {
 | 
			
		||||
            $userId = $matches[1];
 | 
			
		||||
        }
 | 
			
		||||
        $remoteURL = $this->service . '/api/profile/' . urlencode($userId) . '/followers'; // todo implement/change
 | 
			
		||||
        $remoteURL = $this->service . '/api/profile/' . urlencode($userId) . '/followers';
 | 
			
		||||
 | 
			
		||||
        [$response, $info] = \Federator\Main::getFromRemote($remoteURL, []);
 | 
			
		||||
        if ($info['http_code'] != 200) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue