summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaxence Lange <maxence@artificial-owl.com>2019-10-10 16:00:27 -0100
committerRobin Appelman <robin@icewind.nl>2020-10-13 23:51:41 +0200
commit9edfc83a8f4fdd2a4e338177a1a0d9d81e276ac9 (patch)
treee6922b7062a6d1c8f65d7ff8ebb406de036d0eea
parent43944359909388de635198ca2818cbd51ba6b668 (diff)
cleaning
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
-rw-r--r--appinfo/routes.php2
-rw-r--r--lib/Db/SocialLimitsQueryBuilder.php9
-rw-r--r--lib/Db/StreamRequest.php4
3 files changed, 9 insertions, 6 deletions
diff --git a/appinfo/routes.php b/appinfo/routes.php
index f88528b8..077c37ee 100644
--- a/appinfo/routes.php
+++ b/appinfo/routes.php
@@ -50,7 +50,7 @@ return [
['name' => 'Navigation#resizedGetPublic', 'url' => '/document/public/resized', 'verb' => 'GET'],
['name' => 'ActivityPub#actor', 'url' => '/users/{username}', 'verb' => 'GET'],
- ['name' => 'ActivityPub#actorAlias', 'url' => '/@{username}/', 'verb' => 'GET'],
+ ['name' => 'ActivityPub#actorAlias', 'url' => '/@{username}', 'verb' => 'GET'],
['name' => 'ActivityPub#inbox', 'url' => '/@{username}/inbox', 'verb' => 'POST'],
['name' => 'ActivityPub#getInbox', 'url' => '/@{username}/inbox', 'verb' => 'GET'],
['name' => 'ActivityPub#sharedInbox', 'url' => '/inbox', 'verb' => 'POST'],
diff --git a/lib/Db/SocialLimitsQueryBuilder.php b/lib/Db/SocialLimitsQueryBuilder.php
index d3a4ff47..50877b8b 100644
--- a/lib/Db/SocialLimitsQueryBuilder.php
+++ b/lib/Db/SocialLimitsQueryBuilder.php
@@ -76,8 +76,15 @@ class SocialLimitsQueryBuilder extends SocialCrossQueryBuilder {
* Limit the request to the Id (string)
*
* @param string $id
+ * @param bool $prim
*/
- public function limitToInReplyTo(string $id) {
+ public function limitToInReplyTo(string $id, bool $prim = false) {
+ if ($prim) {
+ $this->limitToDBField('in_reply_to_prim', $this->prim($id), false);
+
+ return;
+ }
+
$this->limitToDBField('in_reply_to', $id, false);
}
diff --git a/lib/Db/StreamRequest.php b/lib/Db/StreamRequest.php
index f9d86249..7e5ec825 100644
--- a/lib/Db/StreamRequest.php
+++ b/lib/Db/StreamRequest.php
@@ -274,11 +274,7 @@ class StreamRequest extends StreamRequestBuilder {
$qb->limitToInReplyTo($id);
$qb->limitPaginate($since, $limit);
- $expr = $qb->expr();
$qb->linkToCacheActors('ca', 's.attributed_to_prim');
-
- $qb->andWhere($expr->eq('s.attributed_to', 'ca.id_prim'));
-
if ($asViewer) {
$qb->limitToViewer('sd', 'f', true);
$qb->leftJoinStreamAction();