Feature to show only my posts in the user page (#3753)
* Fix #3681 * Feature to show only my posts in the user page
This commit is contained in:
		@@ -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) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user