Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/spreed.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2022-09-28 15:30:06 +0300
committerbackportbot-nextcloud[bot] <backportbot-nextcloud[bot]@users.noreply.github.com>2022-09-29 19:27:59 +0300
commit6a14dfc5d9c3c54fbb71869d93b9abf6bd92d9d7 (patch)
tree007a49a1b37b3fa9e512602e54481fe5997e0019 /lib
parenta1d8a33f67e6428dc4bf812eb2e4a2dfc9921ea3 (diff)
Add unit test for token and message id extraction
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/Collaboration/Reference/TalkReferenceProvider.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Collaboration/Reference/TalkReferenceProvider.php b/lib/Collaboration/Reference/TalkReferenceProvider.php
index f418473c2..9ba2a6f8a 100644
--- a/lib/Collaboration/Reference/TalkReferenceProvider.php
+++ b/lib/Collaboration/Reference/TalkReferenceProvider.php
@@ -74,7 +74,7 @@ class TalkReferenceProvider implements IReferenceProvider {
* @return array|null
* @psalm-return ReferenceMatch|null
*/
- private function getTalkAppLinkToken(string $referenceText): ?array {
+ protected function getTalkAppLinkToken(string $referenceText): ?array {
$indexPhpUrl = $this->urlGenerator->getAbsoluteURL('/index.php/call/');
$rewriteUrl = $this->urlGenerator->getAbsoluteURL('/call/');
@@ -109,7 +109,7 @@ class TalkReferenceProvider implements IReferenceProvider {
if ($hashPosition !== false) {
$afterHash = substr($urlOfInterest, $hashPosition + 1);
if (preg_match('/^message_(\d+)$/', $afterHash, $matches)) {
- $messageId = $matches[1];
+ $messageId = (int) $matches[1];
}
}
@@ -140,7 +140,7 @@ class TalkReferenceProvider implements IReferenceProvider {
/**
* @throws RoomNotFoundException
*/
- private function fetchReference(Reference $reference): void {
+ protected function fetchReference(Reference $reference): void {
if ($this->userId === null) {
throw new RoomNotFoundException();
}