Skip to content

Commit

Permalink
Merge remote-tracking branch 'cherry/develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
caipira113 committed Oct 25, 2023
2 parents ecc9881 + bc3e5f2 commit fbfc723
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 25 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
- Fix: ローカルタイムラインに投稿者自身の投稿への返信が含まれない問題を修正
- Fix: 自分のフォローしているユーザーの自分のフォローしていないユーザーの visibility: followers な投稿への返信がストリーミングで流れてくる問題を修正
- Fix: RedisへのTLキャッシュが有効の場合にHTL/LTL/STLが空になることがある問題を修正
- Fix: STLでフォローしていないチャンネルが取得される問題を修正

## 2023.10.2

Expand Down
9 changes: 5 additions & 4 deletions CHANGELOG_CHERRYPICK.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ Misskey의 전체 변경 사항을 확인하려면, [CHANGELOG.md#2023xx](CHANGE
# 릴리즈 노트
이 문서는 CherryPick의 변경 사항만 포함합니다.

## 4.x.x
## 4.5.0
출시일: unreleased<br>
기반 Misskey 버전: 2023.x.x<br>
기반 Misskey 버전: 2023.11.0<br>
Misskey의 전체 변경 사항을 확인하려면, [CHANGELOG.md#2023xx](CHANGELOG.md#2023xx) 문서를 참고하십시오.

### Client
Expand All @@ -38,11 +38,12 @@ Misskey의 전체 변경 사항을 확인하려면, [CHANGELOG.md#2023xx](CHANGE
- Enhance: 노트 작성 폼에서 노트를 게시한 뒤에 textarea의 높이를 원래대로 되돌림
- Enhance: 노트 상세 페이지의 답글 목록 개선
- Enhance: 유저 페이지 개선
- 요약 탭의 하이라이트를 제거
- 노트 탭으로 하이라이트를 이동
- 요약 탭의 하이라이트를 제거 & 노트 탭으로 하이라이트를 이동
- 요약 탭의 리액션을 제거 & 노트 탭으로 리액션을 이동
- chore: 이모티콘 이름 필드에서 autocapitalize를 끄기 (misskey-dev/misskey#12139)
- Fix: 외부 리소스 설치 페이지에서 페이지 캐시가 작동하는 문제 수정 (misskey-dev/misskey#12105)
- Fix: 채널 생성/업데이트 시 실패하면 아무 것도 표시되지 않는 문제 수정 misskey-dev/misskey#11983 (misskey-dev/misskey#12142)
- Fix: 유저 페이지의 미디어 타임라인에서 미디어가 없는 답글이 표시됨 #388

### Server
- Feat: 연합에서 노트 수정이 반영됨 (libnare/cp-castella#1)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cherrypick",
"version": "4.4.1",
"version": "4.5.0-beta.1",
"basedMisskeyVersion": "2023.11.0-beta.3",
"codename": "nasubi",
"repository": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import { Brackets } from 'typeorm';
import { Inject, Injectable } from '@nestjs/common';
import type { NotesRepository, FollowingsRepository, MiNote } from '@/models/_.js';
import type { NotesRepository, FollowingsRepository, MiNote, ChannelFollowingsRepository } from '@/models/_.js';
import { Endpoint } from '@/server/api/endpoint-base.js';
import ActiveUsersChart from '@/core/chart/charts/active-users.js';
import { NoteEntityService } from '@/core/entities/NoteEntityService.js';
Expand Down Expand Up @@ -70,6 +70,9 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
@Inject(DI.notesRepository)
private notesRepository: NotesRepository,

@Inject(DI.channelFollowingsRepository)
private channelFollowingsRepository: ChannelFollowingsRepository,

private noteEntityService: NoteEntityService,
private roleService: RoleService,
private activeUsersChart: ActiveUsersChart,
Expand Down Expand Up @@ -216,6 +219,11 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
withCats: boolean,
}, me: MiLocalUser) {
const followees = await this.userFollowingService.getFollowees(me.id);
const followingChannels = await this.channelFollowingsRepository.find({
where: {
followerId: me.id,
},
});

const query = this.queryService.makePaginationQuery(this.notesRepository.createQueryBuilder('note'), ps.sinceId, ps.untilId)
.andWhere(new Brackets(qb => {
Expand All @@ -234,6 +242,14 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
.leftJoinAndSelect('reply.user', 'replyUser')
.leftJoinAndSelect('renote.user', 'renoteUser');

if (followingChannels.length > 0) {
const followingChannelIds = followingChannels.map(x => x.followeeId);

query.andWhere('note.channelId IN (:...followingChannelIds) OR note.channelId IS NULL', { followingChannelIds });
} else {
query.andWhere('note.channelId IS NULL');
}

if (!ps.withReplies) {
query.andWhere(new Brackets(qb => {
qb
Expand Down
6 changes: 5 additions & 1 deletion packages/frontend/src/pages/user/index.timeline.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@ SPDX-License-Identifier: AGPL-3.0-only
<option value="all">{{ i18n.ts.all }}</option>
<option value="featured">{{ i18n.ts.featured }}</option>
<option value="files">{{ i18n.ts.withFiles }}</option>
<option value="reactions">{{ i18n.ts.reaction }}</option>
</MkTab>
</template>
<MkNotes v-if="include === 'featured'" :noGap="true" :pagination="featuredPagination" :class="$style.tl"/>
<XReactions v-else-if="include === 'reactions' && (($i && ($i.id === user.id)) || user.publicReactions)" :user="user"></XReactions>
<MkNotes v-else :noGap="true" :pagination="pagination" :class="$style.tl"/>
</MkStickyContainer>
</template>
Expand All @@ -23,7 +25,9 @@ import { ref, computed } from 'vue';
import * as Misskey from 'cherrypick-js';
import MkNotes from '@/components/MkNotes.vue';
import MkTab from '@/components/MkTab.vue';
import XReactions from '@/pages/user/reactions.vue';
import { i18n } from '@/i18n.js';
import { $i } from '@/account.js';

const props = defineProps<{
user: Misskey.entities.UserDetailed;
Expand All @@ -37,7 +41,7 @@ const pagination = {
params: computed(() => ({
userId: props.user.id,
withRenotes: include.value === 'all',
withReplies: include.value === 'all' || include.value === 'files',
withReplies: include.value === 'all',
withChannelNotes: include.value === 'all',
withFiles: include.value === 'files',
})),
Expand Down
8 changes: 1 addition & 7 deletions packages/frontend/src/pages/user/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ SPDX-License-Identifier: AGPL-3.0-only
<XTimeline v-else-if="tab === 'notes'" :user="user"/>
<XActivity v-else-if="tab === 'activity'" :user="user"/>
<XAchievements v-else-if="tab === 'achievements'" :user="user"/>
<XReactions v-else-if="tab === 'reactions'" :user="user"/>
<XClips v-else-if="tab === 'clips'" :user="user"/>
<XLists v-else-if="tab === 'lists'" :user="user"/>
<XPages v-else-if="tab === 'pages'" :user="user"/>
Expand Down Expand Up @@ -52,7 +51,6 @@ const XHome = defineAsyncComponent(() => import('./home.vue'));
const XTimeline = defineAsyncComponent(() => import('./index.timeline.vue'));
const XActivity = defineAsyncComponent(() => import('./activity.vue'));
const XAchievements = defineAsyncComponent(() => import('./achievements.vue'));
const XReactions = defineAsyncComponent(() => import('./reactions.vue'));
const XClips = defineAsyncComponent(() => import('./clips.vue'));
const XLists = defineAsyncComponent(() => import('./lists.vue'));
const XPages = defineAsyncComponent(() => import('./pages.vue'));
Expand Down Expand Up @@ -106,11 +104,7 @@ const headerTabs = $computed(() => user ? [{
key: 'achievements',
title: i18n.ts.achievements,
icon: 'ti ti-medal',
}] : []), ...($i && ($i.id === user.id)) || user.publicReactions ? [{
key: 'reactions',
title: i18n.ts.reaction,
icon: 'ti ti-mood-happy',
}] : [], {
}] : []), {
key: 'clips',
title: i18n.ts.clips,
icon: 'ti ti-paperclip',
Expand Down
20 changes: 9 additions & 11 deletions packages/frontend/src/pages/user/reactions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,16 @@ SPDX-License-Identifier: AGPL-3.0-only
-->

<template>
<MkSpacer :contentMax="700">
<MkPagination v-slot="{items}" ref="list" :pagination="pagination">
<div v-for="item in items" :key="item.id" :to="`/clips/${item.id}`" class="_panel _margin">
<div :class="$style.header">
<MkAvatar :class="$style.avatar" :user="user"/>
<MkReactionIcon :class="$style.reaction" :reaction="item.type" :noStyle="true"/>
<MkTime :time="item.createdAt" :class="$style.createdAt"/>
</div>
<MkNote :key="item.id" :note="item.note"/>
<MkPagination v-slot="{items}" ref="list" :pagination="pagination">
<div v-for="item in items" :key="item.id" :to="`/clips/${item.id}`" class="_panel _margin">
<div :class="$style.header">
<MkAvatar :class="$style.avatar" :user="user"/>
<MkReactionIcon :class="$style.reaction" :reaction="item.type" :noStyle="true"/>
<MkTime :time="item.createdAt" :class="$style.createdAt"/>
</div>
</MkPagination>
</MkSpacer>
<MkNote :key="item.id" :note="item.note"/>
</div>
</MkPagination>
</template>

<script lang="ts" setup>
Expand Down

0 comments on commit fbfc723

Please sign in to comment.