mirror of
https://framagit.org/hubzilla/core.git
synced 2026-06-21 00:52:33 -04:00
dismiss our own votes from select query. they are not flagged with item_hidden because otherwise they would not be delivered to the poll owner. received votes are (and should be) flagged with item_hidden so that they are not being relayed.
This commit is contained in:
@@ -272,7 +272,6 @@ function item_forwardable($item) {
|
||||
str_contains($item['postopts'], 'nodeliver') ||
|
||||
// actor not fetchable
|
||||
(isset($item['author']['xchan_network']) && in_array($item['author']['xchan_network'], ['rss', 'anon', 'token']))
|
||||
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
@@ -5387,6 +5386,7 @@ function item_by_item_id(int $id, int $parent, int $type = ITEM_TYPE_POST): arra
|
||||
item.id = %d
|
||||
AND item.uid = %d
|
||||
AND item.verb IN ('Create', 'Update', 'EmojiReact')
|
||||
AND item.obj_type NOT IN ('Answer')
|
||||
$item_normal_sql",
|
||||
intval($id),
|
||||
intval(local_channel())
|
||||
@@ -5472,6 +5472,7 @@ function items_by_parent_ids(array $parents, null|array $thr_parents = null, str
|
||||
FROM item
|
||||
WHERE item.parent IN ($ids)
|
||||
AND item.verb IN ('Create', 'Update', 'EmojiReact')
|
||||
AND item.obj_type NOT IN ('Answer')
|
||||
AND item.item_thread_top = 0
|
||||
$thr_parent_sql
|
||||
$permission_sql
|
||||
@@ -5550,6 +5551,7 @@ function item_reaction_sql(string $ids, string $permission_sql = '', string $joi
|
||||
$observer_sql
|
||||
FROM item
|
||||
WHERE item.verb IN ($verbs_str)
|
||||
AND item.obj_type NOT IN ('Answer')
|
||||
AND item.item_thread_top = 0
|
||||
AND item.parent IN ($ids)
|
||||
$item_normal_sql
|
||||
@@ -5625,6 +5627,7 @@ function items_by_thr_parent(string $mid, int $parent, int|null $offset = null):
|
||||
item.thr_parent = '%s'
|
||||
AND item.uid = %d
|
||||
AND item.verb IN ('Create', 'Update', 'EmojiReact')
|
||||
AND item.obj_type NOT IN ('Answer')
|
||||
AND item.item_thread_top = 0
|
||||
$item_normal_sql
|
||||
$order_sql",
|
||||
@@ -5652,6 +5655,7 @@ function items_by_thr_parent(string $mid, int $parent, int|null $offset = null):
|
||||
item.thr_parent = '%s'
|
||||
AND item.uid = %d
|
||||
AND item.verb IN ('Create', 'Update', 'EmojiReact')
|
||||
AND item.obj_type NOT IN ('Answer')
|
||||
AND item.item_thread_top = 0
|
||||
$permission_sql
|
||||
$item_normal_sql
|
||||
|
||||
Reference in New Issue
Block a user