]> git.mxchange.org Git - friendica.git/commitdiff
Merge remote-tracking branch 'upstream/2021.06-rc' into forum-handling
authorMichael <heluecht@pirati.ca>
Sat, 5 Jun 2021 06:14:06 +0000 (06:14 +0000)
committerMichael <heluecht@pirati.ca>
Sat, 5 Jun 2021 06:14:06 +0000 (06:14 +0000)
1  2 
src/Model/Item.php

diff --combined src/Model/Item.php
index 2b2699328d6393fd5ef4716e9bcf7afb613c2988,2b57557ca855bd9c92a96a9dc6339cf11afa1fc4..f6bec1561cb0f0ed0e6e010a74bb1e75f133d73c
@@@ -1061,7 -1061,7 +1061,7 @@@ class Ite
                }
  
                // Create Diaspora signature
 -              if ($item['origin'] && empty($item['diaspora_signed_text'])) {
 +              if ($item['origin'] && empty($item['diaspora_signed_text']) && ($item['gravity'] != GRAVITY_PARENT)) {
                        $signed = Diaspora::createCommentSignature($uid, $item);
                        if (!empty($signed)) {
                                $item['diaspora_signed_text'] = json_encode($signed);
                                Logger::info('The resharer is no forum: quit', ['resharer' => $item['author-id'], 'owner' => $parent['owner-id'], 'author' => $parent['author-id'], 'uid' => $item['uid']]);
                                return;
                        }
 -                      self::update(['post-reason' => self::PR_ANNOUNCEMENT, 'causer-id' => $item['author-id']], ['id' => $parent['id']]);
 -                      Logger::info('Set announcement post-reason', ['uri-id' => $item['uri-id'], 'thr-parent-id' => $item['thr-parent-id'], 'uid' => $item['uid']]);
 -                      return;
                }
  
 -              self::update(['owner-id' => $item['author-id'], 'contact-id' => $cid], ['id' => $parent['id']]);
 -              Logger::info('Change owner of the parent', ['uri-id' => $item['uri-id'], 'thr-parent-id' => $item['thr-parent-id'], 'uid' => $item['uid'], 'owner-id' => $item['author-id'], 'contact-id' => $cid]);
 +              self::update(['post-reason' => self::PR_ANNOUNCEMENT, 'causer-id' => $item['author-id']], ['id' => $parent['id']]);
 +              Logger::info('Set announcement post-reason', ['uri-id' => $item['uri-id'], 'thr-parent-id' => $item['thr-parent-id'], 'uid' => $item['uid']]);
        }
  
        /**
                                                'mime'   => $attachment['mimetype'],
                                        ],
                                ]);
-                               if ($item['post-type'] == Item::PT_AUDIO) {
+                               if (($item['post-type'] ?? null) == Item::PT_AUDIO) {
                                        $leading .= $media;
                                } else {
                                        $trailing .= $media;