[PLUGIN][TreeNotes] Correct cache issues and iterate functionality
- Replies ordering now correct - Replies count added - Posting adds new replies to cache (when concerning replies cache is not empty) and increments replies count - Configuration to specify number of in-tree replies shown added - TreeNotes templates was moved from core to plugin - Button to read more replies was added
This commit is contained in:
@@ -265,6 +265,14 @@ class Note extends Model
|
||||
// Assign conversation to this note
|
||||
Conversation::assignLocalConversation($obj, $reply_to);
|
||||
|
||||
// Update replies cache
|
||||
if (!\is_null($reply_to)) {
|
||||
Cache::incr(GSNote::cacheKeys($reply_to)['replies-count']);
|
||||
if (Cache::exists(GSNote::cacheKeys($reply_to)['replies'])) {
|
||||
Cache::listPushRight(GSNote::cacheKeys($reply_to)['replies'], $obj);
|
||||
}
|
||||
}
|
||||
|
||||
$object_mention_ids = [];
|
||||
foreach ($type_note->get('tag') ?? [] as $ap_tag) {
|
||||
switch ($ap_tag->get('type')) {
|
||||
|
Reference in New Issue
Block a user