{{ $ts.receiveFollowRequest }} |
@@ -166,19 +166,23 @@ export default defineComponent({
}, {}, 'closed');
});
- function openRenoteDestination(remoteUser: User): void {
- os.api('users/show', {userId: remoteUser.id}).then(user => {
+ function openRenoteDestination(renoteNotification: misskey.entities.Notification): void {
+ if (renoteNotification.type !== 'renote') {
+ throw new Error("openRenoteDestination()の引数には type: 'renote' のNotificationが渡される必要があります");
+ }
+
+ os.api('users/show', {userId: renoteNotification.user.id}).then(user => {
if (user.host != null && user.followersCount === 0) { // リモートユーザーかつローカルの人間が誰もフォローしていない(最新の投稿が取得できない)ユーザー
window.open(user.url, '_blank', 'rel="nofollow noopener"');
} else {
- os.pageWindow('/@' + user.username + (user.host ? `@${user.host}` : ''));
+ os.pageWindow(notePage(renoteNotification.note));
}
});
}
return {
getNoteSummary: (note: misskey.entities.Note) => getNoteSummary(note),
- openRenoteDestination: (remoteUser: misskey.entities.User) => openRenoteDestination(remoteUser),
+ openRenoteDestination: (renoteNotification: misskey.entities.Notification) => openRenoteDestination(renoteNotification),
followRequestDone,
groupInviteDone,
notePage,