Skip to content

Commit

Permalink
Merge pull request #90 from hideki0403/dev-kakurega
Browse files Browse the repository at this point in the history
release: v2023.10.1-kakurega.1.20.3
  • Loading branch information
hideki0403 authored Oct 17, 2023
2 parents fed3fb1 + 4008475 commit 7144e47
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "misskey",
"version": "2023.10.1-kakurega.1.20.2",
"version": "2023.10.1-kakurega.1.20.3",
"codename": "nasubi",
"repository": {
"type": "git",
Expand Down
7 changes: 7 additions & 0 deletions packages/backend/src/server/api/endpoints/notes/timeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { IdService } from '@/core/IdService.js';
import { CacheService } from '@/core/CacheService.js';
import { isUserRelated } from '@/misc/is-user-related.js';
import { RedisTimelineService } from '@/core/RedisTimelineService.js';
import { ApiLoggerService } from '@/server/api/ApiLoggerService.js';

export const meta = {
tags: ['notes'],
Expand Down Expand Up @@ -64,6 +65,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
private idService: IdService,
private cacheService: CacheService,
private redisTimelineService: RedisTimelineService,
private apiLoggerService: ApiLoggerService,
) {
super(meta, paramDef, async (ps, me) => {
const untilId = ps.untilId ?? (ps.untilDate ? this.idService.genId(new Date(ps.untilDate!)) : null);
Expand All @@ -85,6 +87,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
noteIds = noteIds.slice(0, ps.limit);

if (noteIds.length === 0) {
this.apiLoggerService.logger.warn(`Redis timeline is empty. me: ${me.id}, untilId: ${untilId}, sinceId: ${sinceId}, includeMyRenotes: ${ps.includeMyRenotes}, includeRenotedMyNotes: ${ps.includeRenotedMyNotes}, includeLocalRenotes: ${ps.includeLocalRenotes}, withFiles: ${ps.withFiles}, withRenotes: ${ps.withRenotes}`);
return [];
}

Expand Down Expand Up @@ -122,6 +125,10 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-

timeline.sort((a, b) => a.id > b.id ? -1 : 1);

if (timeline.length === 0) {
this.apiLoggerService.logger.warn(`Timeline is empty. me: ${me.id}, untilId: ${untilId}, sinceId: ${sinceId}, includeMyRenotes: ${ps.includeMyRenotes}, includeRenotedMyNotes: ${ps.includeRenotedMyNotes}, includeLocalRenotes: ${ps.includeLocalRenotes}, withFiles: ${ps.withFiles}, withRenotes: ${ps.withRenotes}`);
}

process.nextTick(() => {
this.activeUsersChart.read(me);
});
Expand Down
7 changes: 7 additions & 0 deletions packages/frontend/src/components/MkPagination.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ SPDX-License-Identifier: AGPL-3.0-only

<script lang="ts">
import { computed, ComputedRef, isRef, nextTick, onActivated, onBeforeUnmount, onDeactivated, onMounted, ref, watch } from 'vue';
import { captureMessage } from '@sentry/vue';
import * as Misskey from 'misskey-js';
import * as os from '@/os.js';
import { onScrollTop, isTopVisible, getBodyScrollHeight, getScrollContainer, onScrollBottom, scrollToBottom, scroll, isBottomVisible } from '@/scripts/scroll.js';
Expand Down Expand Up @@ -208,6 +209,12 @@ async function init(): Promise<void> {
if (i === 3) item._shouldInsertAd_ = true;
}
if (props.pagination.endpoint === 'notes/timeline' && res.length === 0) {
captureMessage('timeline is empty', {
extra: params,
});
}
if (res.length === 0 || props.pagination.noPaging) {
concatItems(res);
more.value = false;
Expand Down

0 comments on commit 7144e47

Please sign in to comment.