aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--Digitigrade/Job/PeriodicFetchRemoteFeed.php14
-rw-r--r--Digitigrade/Model/Actor.php2
-rw-r--r--locale/en_GB.json1
-rw-r--r--templates/actor/profile_page.php4
4 files changed, 15 insertions, 6 deletions
diff --git a/Digitigrade/Job/PeriodicFetchRemoteFeed.php b/Digitigrade/Job/PeriodicFetchRemoteFeed.php
index e84757f..c64446d 100644
--- a/Digitigrade/Job/PeriodicFetchRemoteFeed.php
+++ b/Digitigrade/Job/PeriodicFetchRemoteFeed.php
@@ -28,10 +28,14 @@ class PeriodicFetchRemoteFeed extends Job {
}
}
- public function submit() {
- JobQueue::getInstance()->submitDelayedUntil(
- $this,
- (new \DateTimeImmutable)->add(new \DateInterval(GlobalSettings::getInstance()->get('instance.feedUpdateInterval') ?? 'PT1H'))
- );
+ public function submit(bool $now = false) {
+ if ($now) {
+ JobQueue::getInstance()->submitUrgent($this);
+ } else {
+ JobQueue::getInstance()->submitDelayedUntil(
+ $this,
+ (new \DateTimeImmutable)->add(new \DateInterval(GlobalSettings::getInstance()->get('instance.feedUpdateInterval') ?? 'PT1H'))
+ );
+ }
}
} \ No newline at end of file
diff --git a/Digitigrade/Model/Actor.php b/Digitigrade/Model/Actor.php
index 3fb7e4e..a8909df 100644
--- a/Digitigrade/Model/Actor.php
+++ b/Digitigrade/Model/Actor.php
@@ -259,7 +259,7 @@ class Actor extends PushableModel implements RpcReceiver {
if (!$target->isLocal && !isset($target->endpoints->follow, $target->endpoints->unfollow)) {
// if this is the first time someone local followed this actor, put a job in to update them
if (count(array_filter($target->findFollowers(), fn(Actor $a) => $a->isLocal)) == 0) {
- (new PeriodicFetchRemoteFeed($target))->submit();
+ (new PeriodicFetchRemoteFeed($target))->submit(now: true);
}
FollowRelation::create($this, $target, FollowRelationStatus::ACTIVE);
// no need to processNotifications because it's always going to be a remote user & not pending
diff --git a/locale/en_GB.json b/locale/en_GB.json
index d7cc08e..6e17c18 100644
--- a/locale/en_GB.json
+++ b/locale/en_GB.json
@@ -41,6 +41,7 @@
"user.profile.poke.action": "Send",
"user.profile.poke.urgent.action": "Send urgently",
"user.profile.poke.success": "Sent!",
+ "user.profile.noPushWarning": "Due to technical reasons, notes and interactions from this account may not appear on this instance immediately.",
"user.notes.placeholder": "This user hasn't posted anything yet.",
"user.rss.description": "Public notes by %s",
"timeline.global": "Global timeline",
diff --git a/templates/actor/profile_page.php b/templates/actor/profile_page.php
index 7ae8d09..f9b688c 100644
--- a/templates/actor/profile_page.php
+++ b/templates/actor/profile_page.php
@@ -38,6 +38,10 @@ call_template('skeleton', [
call_template('actor/profile_poke_form', ['actor' => $actor]);
}
+ if (!$actor->isLocal && !isset($actor->endpoints->follow)) {
+ call_template('alertbox', ['variety' => 'info', 'message' => __('user.profile.noPushWarning')]);
+ }
+
echo '<hr>';
$notes = Note::findAllWithAuthor($actor, 20);
if (count($notes) == 0) {