Merge branch firefish:develop into fix/10404-object-storage-prefix

This commit is contained in:
yumeko 2023-07-24 10:08:38 +00:00
commit ae22abd61b
4 changed files with 18 additions and 11 deletions

View File

@ -1 +1 @@
{} _lang_: Български

View File

@ -1959,3 +1959,8 @@ donationLink: 寄付ページへのリンク
removeMember: メンバーを削除 removeMember: メンバーを削除
removeQuote: 引用を削除 removeQuote: 引用を削除
removeRecipient: 宛先を削除 removeRecipient: 宛先を削除
_feeds:
copyFeed: "フィードのURLをコピー"
rss: "RSS"
atom: "Atom"
jsonFeed: "JSONフィード"

View File

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

View File

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