]> git.mxchange.org Git - friendica.git/commitdiff
Change DiasporaContact->subscribe type to string
authorHypolite Petovan <hypolite@mrpetovan.com>
Sat, 10 Dec 2022 14:23:29 +0000 (09:23 -0500)
committerHypolite Petovan <hypolite@mrpetovan.com>
Sat, 10 Dec 2022 14:23:29 +0000 (09:23 -0500)
- This avoids the expected "{uri}" placeholder to be URL-encoded in the string representation

src/Protocol/Diaspora/Entity/DiasporaContact.php
src/Protocol/Diaspora/Factory/DiasporaContact.php

index 7fbd2831f7e7a6e213f9f5e4c733a98fbeac1fae..a5ad1f08af27393382d5471b7bb12763121c21ef 100644 (file)
@@ -82,7 +82,7 @@ class DiasporaContact extends \Friendica\BaseEntity
        protected $notify;
        /** @var UriInterface */
        protected $poll;
-       /** @var UriInterface */
+       /** @var string URL pattern string including a placeholder "{uri}" that mustn't be URL-encoded */
        protected $subscribe;
        /** @var bool */
        protected $searchable;
@@ -107,7 +107,7 @@ class DiasporaContact extends \Friendica\BaseEntity
                UriInterface $url, \DateTime $created, string $guid = null, string $addr = null, UriInterface $alias = null,
                string $nick = null, string $name = null, string $givenName = null, string $familyName = null,
                UriInterface $photo = null, UriInterface $photoMedium = null, UriInterface $photoSmall = null,
-               UriInterface $batch = null, UriInterface $notify = null, UriInterface $poll = null, UriInterface $subscribe = null,
+               UriInterface $batch = null, UriInterface $notify = null, UriInterface $poll = null, string $subscribe = null,
                bool $searchable = null, string $pubKey = null, UriInterface $baseurl = null, int $gsid = null,
                \DateTime $updated = null, int $interacting_count = 0, int $interacted_count = 0, int $post_count = 0, int $uriId = null
        ) {
index d5c91d200bea97390fe428170b8f5237db047865..0389b81ee69d42e88166c86939283ce01cd69419 100644 (file)
@@ -45,7 +45,7 @@ class DiasporaContact extends \Friendica\BaseFactory implements ICanCreateFromTa
                        $row['batch'] ? new Uri($row['batch']) : null,
                        $row['notify'] ? new Uri($row['notify']) : null,
                        $row['poll'] ? new Uri($row['poll']) : null,
-                       $row['subscribe'] ? new Uri($row['subscribe']) : null,
+                       $row['subscribe'],
                        $row['searchable'],
                        $row['pubkey'],
                        $row['baseurl'] ? new Uri($row['baseurl']) : null,
@@ -87,7 +87,7 @@ class DiasporaContact extends \Friendica\BaseFactory implements ICanCreateFromTa
                        $data['batch'] ? new Uri($data['batch']) : null,
                        $data['notify'] ? new Uri($data['notify']) : null,
                        $data['poll'] ? new Uri($data['poll']) : null,
-                       $data['subscribe'] ? new Uri($data['subscribe']) : null,
+                       $data['subscribe'],
                        !$data['hide'],
                        $data['pubkey'],
                        $data['baseurl'] ? new Uri($data['baseurl']) : null,