]> git.mxchange.org Git - friendica.git/blobdiff - src/Protocol/ActivityPub/Transmitter.php
Merge pull request #10717 from nupplaphil/bug/drone_missing_bin
[friendica.git] / src / Protocol / ActivityPub / Transmitter.php
index ab23f81d84da03c77bb6e4676c3ad8df9b1562eb..14d4a8a5a1dd86e362f90628dc078b5be454ee3d 100644 (file)
@@ -392,6 +392,20 @@ class Transmitter
                        }
                }
 
+               $custom_fields = [];
+
+               foreach (DI::profileField()->selectByContactId(0, $uid) as $profile_field) {
+                       $custom_fields[] = [
+                               'type' => 'PropertyValue',
+                               'name' => $profile_field->label,
+                               'value' => BBCode::convertForUriId($owner['uri-id'], $profile_field->value)
+                       ];
+               };
+
+               if (!empty($custom_fields)) {
+                       $data['attachment'] = $custom_fields;
+               }
+
                $data['generator'] = self::getService();
 
                // tags: https://kitty.town/@inmysocks/100656097926961126.json
@@ -877,6 +891,9 @@ class Transmitter
                }
 
                $reply = DBA::selectFirst('mail', ['uri', 'uri-id', 'from-url'], ['parent-uri' => $mail['parent-uri'], 'reply' => false]);
+               if (!DBA::isResult($reply)) {
+                       $reply = $mail;
+               }
 
                // Making the post more compatible for Mastodon by:
                // - Making it a note and not an article (no title)