mirror of
https://github.com/friendica/friendica
synced 2025-04-23 01:50:10 +00:00
Add more post reasons
This commit is contained in:
parent
0971bcf165
commit
699152e15e
4 changed files with 15 additions and 5 deletions
|
@ -363,10 +363,10 @@ class Processor
|
|||
if (!empty($activity['raw'])) {
|
||||
$item['source'] = $activity['raw'];
|
||||
$item['protocol'] = Conversation::PARCEL_ACTIVITYPUB;
|
||||
}
|
||||
|
||||
if (isset($activity['push'])) {
|
||||
$item['direction'] = $activity['push'] ? Conversation::PUSH : Conversation::PULL;
|
||||
}
|
||||
if (isset($activity['push'])) {
|
||||
$item['direction'] = $activity['push'] ? Conversation::PUSH : Conversation::PULL;
|
||||
}
|
||||
|
||||
if (!empty($activity['from-relay'])) {
|
||||
|
@ -900,6 +900,8 @@ class Processor
|
|||
$item['post-reason'] = Item::PR_RELAY;
|
||||
} elseif (!empty($activity['thread-completion'])) {
|
||||
$item['post-reason'] = Item::PR_FETCHED;
|
||||
} elseif (in_array($item['post-reason'], [Item::PR_GLOBAL, Item::PR_NONE]) && !empty($activity['push'])) {
|
||||
$item['post-reason'] = Item::PR_PUSHED;
|
||||
}
|
||||
|
||||
if ($item['isForum'] ?? false) {
|
||||
|
|
|
@ -986,7 +986,7 @@ class Receiver
|
|||
}
|
||||
|
||||
if (!empty($reply)) {
|
||||
$parents = Post::select(['uid'], ['uri' => $reply]);
|
||||
$parents = Post::select(['uid'], DBA::mergeConditions(['uri' => $reply], ["`uid` != ?", 0]));
|
||||
while ($parent = Post::fetch($parents)) {
|
||||
$receivers[$parent['uid']] = ['uid' => $parent['uid'], 'type' => self::TARGET_ANSWER];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue