aboutsummaryrefslogtreecommitdiffhomepage
path: root/routes/note_fragment.php
diff options
context:
space:
mode:
authorwinter2025-01-19 22:17:12 +0000
committerwinter2025-01-19 22:17:12 +0000
commit8c6dad8c48d5d730b102d9de0079fee9752b0d35 (patch)
tree2cfe07a8c7958f78c767fd0d1444c3f8fef70511 /routes/note_fragment.php
parent2d9bd87fb1c565ee161f93219ce2533e8dbffe06 (diff)
implement notifications
Diffstat (limited to 'routes/note_fragment.php')
-rw-r--r--routes/note_fragment.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/routes/note_fragment.php b/routes/note_fragment.php
index 84f68c6..5fe979a 100644
--- a/routes/note_fragment.php
+++ b/routes/note_fragment.php
@@ -24,6 +24,7 @@ Router::getInstance()->mount('/fragment/note/:id/:action', function (array $args
$interaction = Interaction::create($user->actor, InteractionKind::from($action), $note);
$interaction->publish();
$interaction->processTimelineAdditions();
+ $interaction->processNotifications();
$active = true;
} else {
// we are removing the existing one
@@ -55,9 +56,12 @@ Router::getInstance()->mount('/fragment/note/:id/reply', function (array $args)
);
$reply->inReplyTo = $note;
$reply->threadApex = $note->threadApex ?? $note;
+ // TODO: do mentions properly and not just like this
+ $reply->mentions = [$note->author];
$reply->save();
$reply->publish();
$reply->processTimelineAdditions();
+ $reply->processNotifications();
}
render_template('reply_form', ['note' => $note]);
});
@@ -78,6 +82,7 @@ Router::getInstance()->mount('/fragment/note', function (array $args) {
);
$note->publish();
$note->processTimelineAdditions();
+ $note->processNotifications();
}
render_template('write_note_form');
}); \ No newline at end of file