Skip to content

Commit 7d5732f

Browse files
committed
Merge tag '0.6.16'
Hollo 0.6.16
2 parents 7a21c4c + 1425867 commit 7d5732f

2 files changed

Lines changed: 28 additions & 2 deletions

File tree

CHANGES.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,18 @@ To be released.
3232
[#179]: https://github.com/fedify-dev/hollo/pull/179
3333

3434

35+
Version 0.6.16
36+
--------------
37+
38+
Released on November 12, 2025.
39+
40+
- Fixed search functionality not returning any results when searching for
41+
post content.
42+
43+
- Fixed search results including shared posts (reposts/reblogs). Search now
44+
shows only original posts and replies, excluding shares.
45+
46+
3547
Version 0.6.15
3648
--------------
3749

src/api/v2/index.ts

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,17 @@ import {
77
} from "@fedify/fedify";
88
import { zValidator } from "@hono/zod-validator";
99
import { getLogger } from "@logtape/logtape";
10-
import { and, desc, eq, ilike, inArray, lte, or, sql } from "drizzle-orm";
10+
import {
11+
and,
12+
desc,
13+
eq,
14+
ilike,
15+
inArray,
16+
isNull,
17+
lte,
18+
or,
19+
sql,
20+
} from "drizzle-orm";
1121
import { Hono } from "hono";
1222
import { z } from "zod";
1323
import { db } from "../../db";
@@ -79,6 +89,7 @@ app.get(
7989
? await db.query.posts.findMany({
8090
where: and(
8191
or(eq(posts.iri, q), eq(posts.url, q)),
92+
isNull(posts.sharingId),
8293
lte(posts.published, sql`NOW() + INTERVAL '5 minutes'`),
8394
),
8495
with: getPostRelations(owner.id),
@@ -135,7 +146,10 @@ app.get(
135146
}
136147
}
137148
if (query.type == null || query.type === "statuses") {
138-
let filter = ilike(posts.content, `%${q}%`);
149+
let filter = and(
150+
ilike(posts.contentHtml, `%${q}%`),
151+
isNull(posts.sharingId),
152+
)!;
139153
if (query.account_id != null) {
140154
filter = and(filter, eq(posts.accountId, query.account_id))!;
141155
}

0 commit comments

Comments
 (0)