Merge branch 'develop' into feat/scylladb

This commit is contained in:
Namekuji 2023-07-24 13:06:35 -04:00
commit ef9c553535
No known key found for this signature in database
GPG key ID: 1D62332C07FBA532
5 changed files with 12 additions and 10 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 57 KiB

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 55 KiB

After

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 56 KiB

After

Width:  |  Height:  |  Size: 9.1 KiB

View file

@ -60,13 +60,14 @@ export default define(meta, paramDef, async (ps, user) => {
throw new ApiError(meta.errors.noSuchAntenna);
}
const limit = ps.limit + (ps.untilId ? 1 : 0) + (ps.sinceId ? 1 : 0); // untilIdに指定したものも含まれるため+1
const noteIdsRes = await redisClient.xrevrange(
`antennaTimeline:${antenna.id}`,
ps.untilDate || "+",
"-",
ps.untilDate ?? "+",
ps.sinceDate ?? "-",
"COUNT",
ps.limit + 1,
); // untilIdに指定したものも含まれるため+1
limit,
);
if (noteIdsRes.length === 0) {
return [];
@ -74,7 +75,7 @@ export default define(meta, paramDef, async (ps, user) => {
const noteIds = noteIdsRes
.map((x) => x[1][1])
.filter((x) => x !== ps.untilId);
.filter((x) => x !== ps.untilId && x !== ps.sinceId);
if (noteIds.length === 0) {
return [];
@ -105,7 +106,8 @@ export default define(meta, paramDef, async (ps, user) => {
generateMutedUserQuery(query, user);
generateBlockedUserQuery(query, user);
const notes = await query.take(ps.limit).getMany();
const notes = await query.getMany();
notes.sort((a, b) => (a.id > b.id ? -1 : 1));
if (notes.length > 0) {
readNote(user.id, notes);

View file

@ -16,7 +16,7 @@
"@surfbum@firefish.nz",
"@topher@mastodon.online",
"@hanicef@stop.voring.me",
"@nmkj@firefish.jp",
"@nmkj@calckey.jp",
"@unattributed@firefish.social",
"@cody@misskey.codingneko.com",
"@kate@blahaj.zone",
@ -53,9 +53,9 @@
"@riversidebryan@firefish.lgbt",
"@aRubes@sloth.run",
"@andreasdotorg@firefish.social",
"@ozzy@firefish.online",
"@ozzy@calckey.online",
"@leni@windycity.style",
"@mhzmodels@firefish.art",
"@mhzmodels@calckey.art",
"@ReflexVE@firefish.social",
"@mark@firefish.social",
"@skyizwhite@himagine.club",
@ -96,7 +96,7 @@
"@seasicksailor@firefish.social",
"@geerue@firefish.social",
"@WXFanatic@m.ai6yr.org",
"@Hunkabilly@firefish.world"
"@Hunkabilly@calckey.world"
],
"sponsors": [
"@atomicpoet@firefish.social",