bigbluebutton / bigbluebutton-api-php

Offical @BigBlueButton PHP API
https://github.com/bigbluebutton/bigbluebutton/
GNU Lesser General Public License v3.0
179 stars 198 forks source link

EventID filter doesn't run #258

Open Lutice opened 2 months ago

Lutice commented 2 months ago

In file src/Parameters/HooksCreateParameters.php in method

public function getHTTPQuery(): string
    {
        $queries = [
            'callbackURL' => $this->callbackUrl,
            'meetingID'   => $this->meetingId,
            'getRaw'      => !is_null($this->getRaw) ? ($this->getRaw ? 'true' : 'false') : $this->getRaw,
        ];

        return $this->buildHTTPQuery($queries);
    }

You must add the eventId filter like this else the hook return all events, even if you set eventid filter on create parameter:

public function getHTTPQuery(): string
    {
        $queries = [
            'callbackURL' => $this->callbackUrl,
            'meetingID'   => $this->meetingId,
            'eventID'     => $this->eventId,
            'getRaw'      => !is_null($this->getRaw) ? ($this->getRaw ? 'true' : 'false') : $this->getRaw,
        ];

        return $this->buildHTTPQuery($queries);
    }