mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-09 00:24:27 +02:00
We now store the verb in the item-content as well
This commit is contained in:
parent
76dab3b2d7
commit
028c9f4da5
6 changed files with 70 additions and 47 deletions
|
@ -2313,15 +2313,15 @@ class DFRN
|
|||
$item["gravity"] = GRAVITY_ACTIVITY;
|
||||
// only one like or dislike per person
|
||||
// splitted into two queries for performance issues
|
||||
$condition = ['uid' => $item["uid"], 'author-id' => $item["author-id"],
|
||||
$condition = ['uid' => $item["uid"], 'author-id' => $item["author-id"], 'gravity' => GRAVITY_ACTIVITY,
|
||||
'verb' => $item["verb"], 'parent-uri' => $item["parent-uri"]];
|
||||
if (dba::exists('item', $condition)) {
|
||||
if (Item::exists($condition)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$condition = ['uid' => $item["uid"], 'author-id' => $item["author-id"],
|
||||
$condition = ['uid' => $item["uid"], 'author-id' => $item["author-id"], 'gravity' => GRAVITY_ACTIVITY,
|
||||
'verb' => $item["verb"], 'thr-parent' => $item["parent-uri"]];
|
||||
if (dba::exists('item', $condition)) {
|
||||
if (Item::exists($condition)) {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
|
@ -2770,7 +2770,7 @@ class DFRN
|
|||
// Comments can be deleted by the thread owner or comment owner
|
||||
if (($item['id'] != $item['parent']) && ($item['contact-id'] != $importer["id"])) {
|
||||
$condition = ['id' => $item['parent'], 'contact-id' => $importer["id"]];
|
||||
if (!dba::exists('item', $condition)) {
|
||||
if (!Item::exists($condition)) {
|
||||
logger("Item with uri " . $uri . " wasn't found or mustn't be deleted by contact " . $importer["id"] . " - ignoring deletion.", LOGGER_DEBUG);
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue