diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml
index 564b2528f..120860a45 100644
--- a/locales/ja-JP.yml
+++ b/locales/ja-JP.yml
@@ -1374,6 +1374,7 @@ desktop/views/pages/user/user.timeline.vue:
default: "投稿"
with-replies: "投稿と返信"
with-media: "メディア"
+ my-posts: "私の投稿"
empty: "このユーザーはまだ何も投稿していないようです。"
desktop/views/widgets/messaging.vue:
diff --git a/src/client/app/desktop/views/pages/user/user.timeline.vue b/src/client/app/desktop/views/pages/user/user.timeline.vue
index 6d1b23b40..0571ce76f 100644
--- a/src/client/app/desktop/views/pages/user/user.timeline.vue
+++ b/src/client/app/desktop/views/pages/user/user.timeline.vue
@@ -4,6 +4,7 @@
{{ $t('default') }}
{{ $t('with-replies') }}
{{ $t('with-media') }}
+ {{ $t('my-posts') }}
{{ $t('empty') }}
@@ -65,6 +66,7 @@ export default Vue.extend({
limit: fetchLimit + 1,
untilDate: this.date ? this.date.getTime() : new Date().getTime() + 1000 * 86400 * 365,
includeReplies: this.mode == 'with-replies',
+ includeMyRenotes: this.mode != 'my-posts',
withFiles: this.mode == 'with-media'
}).then(notes => {
if (notes.length == fetchLimit + 1) {
@@ -85,6 +87,7 @@ export default Vue.extend({
userId: this.user.id,
limit: fetchLimit + 1,
includeReplies: this.mode == 'with-replies',
+ includeMyRenotes: this.mode != 'my-posts',
withFiles: this.mode == 'with-media',
untilDate: new Date((this.$refs.timeline as any).tail().createdAt).getTime()
});
diff --git a/src/server/api/endpoints/users/notes.ts b/src/server/api/endpoints/users/notes.ts
index e6df1eeec..ec2dab129 100644
--- a/src/server/api/endpoints/users/notes.ts
+++ b/src/server/api/endpoints/users/notes.ts
@@ -156,6 +156,7 @@ export default define(meta, (ps, me) => new Promise(async (res, rej) => {
const sort = { } as any;
const query = {
+ $and: [ {} ],
deletedAt: null,
userId: user._id
} as any;
@@ -188,6 +189,22 @@ export default define(meta, (ps, me) => new Promise(async (res, rej) => {
query.replyId = null;
}
+ if (ps.includeMyRenotes === false) {
+ query.$and.push({
+ $or: [{
+ userId: { $ne: user._id }
+ }, {
+ renoteId: null
+ }, {
+ text: { $ne: null }
+ }, {
+ fileIds: { $ne: [] }
+ }, {
+ poll: { $ne: null }
+ }]
+ });
+ }
+
const withFiles = ps.withFiles != null ? ps.withFiles : ps.mediaOnly;
if (withFiles) {