From 2282bb4a19222a2779a353c542cc1765fcef73cc Mon Sep 17 00:00:00 2001 From: Michael Date: Thu, 4 Feb 2021 09:46:29 +0000 Subject: [PATCH] Fix test data --- src/Model/Item.php | 3 ++- tests/datasets/api.fixture.php | 30 ++++++++++++++++-------------- 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/src/Model/Item.php b/src/Model/Item.php index 70530c45b1..106d50e764 100644 --- a/src/Model/Item.php +++ b/src/Model/Item.php @@ -899,8 +899,9 @@ class Item // If its a post that originated here then tag the thread as "mention" if ($item['origin'] && $item['uid']) { + DBA::update('post-thread-user', ['mention' => true], ['uri-id' => $item['parent-uri-id'], 'uid' => $item['uid']]); DBA::update('thread', ['mention' => true], ['iid' => $parent_id]); - Logger::info('tagged thread as mention', ['parent' => $parent_id, 'uid' => $item['uid']]); + Logger::info('tagged thread as mention', ['parent' => $parent_id, 'parent-uri-id' => $item['parent-uri-id'], 'uid' => $item['uid']]); } // Update the contact relations diff --git a/tests/datasets/api.fixture.php b/tests/datasets/api.fixture.php index aa99fc7cb3..4cba5eeb80 100644 --- a/tests/datasets/api.fixture.php +++ b/tests/datasets/api.fixture.php @@ -419,34 +419,36 @@ return [ 'msg_cache' => 'A test reply from an item', ], ], - 'thread' => [ + 'post-thread' => [ [ - 'iid' => 1, 'uri-id' => 1, - 'visible' => 1, - 'contact-id' => 42, 'author-id' => 42, 'owner-id' => 42, + ], + [ + 'uri-id' => 3, + 'author-id' => 43, + 'owner-id' => 43, + ], + [ + 'uri-id' => 6, + 'author-id' => 44, + 'owner-id' => 44, + ], + ], + 'post-thread-user' => [ + [ + 'uri-id' => 1, 'uid' => 42, 'wall' => 1, ], [ - 'iid' => 3, 'uri-id' => 3, - 'visible' => 1, - 'contact-id' => 43, - 'author-id' => 43, - 'owner-id' => 43, 'uid' => 0, 'wall' => 1, ], [ - 'iid' => 6, 'uri-id' => 6, - 'visible' => 1, - 'contact-id' => 44, - 'author-id' => 44, - 'owner-id' => 44, 'uid' => 0, 'wall' => 1, ],