Read config, handle lastEventId in topicmanager
This commit is contained in:
		@@ -17,6 +17,7 @@ use React\Http\Message\Response;
 | 
			
		||||
use React\Promise\Promise;
 | 
			
		||||
use React\Promise\PromiseInterface;
 | 
			
		||||
use React\Stream\ThroughStream;
 | 
			
		||||
use Rize\UriTemplate\UriTemplate;
 | 
			
		||||
use Symfony\Component\Uid\Uuid;
 | 
			
		||||
 | 
			
		||||
class MercureHandler
 | 
			
		||||
@@ -194,11 +195,15 @@ class MercureHandler
 | 
			
		||||
        $matched = 0;
 | 
			
		||||
        foreach ((array)$topic as $match) {
 | 
			
		||||
            foreach ($claims as $claim) {
 | 
			
		||||
                // TODO implement matching of URI Templates
 | 
			
		||||
                if (($claim === "*") || ($claim === $match)) {
 | 
			
		||||
                    $matched++;
 | 
			
		||||
                    break;
 | 
			
		||||
                }
 | 
			
		||||
                // TODO make sure that UriTemplate parsing works
 | 
			
		||||
                if ((new UriTemplate())->extract($claim, $match, true)) {
 | 
			
		||||
                    $matched++;
 | 
			
		||||
                    break;
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        return ($matched == count($topic));
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user