削除された投稿はタイムライン上で表示しないようにする (#2887)
* Excepts deleted notes on query * Hide deleted notes * Use v-show
This commit is contained in:
		
							parent
							
								
									9535759787
								
							
						
					
					
						commit
						1a689f6641
					
				
					 10 changed files with 16 additions and 3 deletions
				
			
		| 
						 | 
				
			
			@ -58,6 +58,8 @@ export default async (params: any, user: ILocalUser) => {
 | 
			
		|||
	};
 | 
			
		||||
 | 
			
		||||
	const query = {
 | 
			
		||||
		deletedAt: null,
 | 
			
		||||
 | 
			
		||||
		// public only
 | 
			
		||||
		visibility: 'public',
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -129,6 +129,8 @@ export default async (params: any, user: ILocalUser) => {
 | 
			
		|||
 | 
			
		||||
	const query = {
 | 
			
		||||
		$and: [{
 | 
			
		||||
			deletedAt: null,
 | 
			
		||||
 | 
			
		||||
			$or: [{
 | 
			
		||||
				// フォローしている人の投稿
 | 
			
		||||
				$or: followQuery
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -71,6 +71,8 @@ export default async (params: any, user: ILocalUser) => {
 | 
			
		|||
	};
 | 
			
		||||
 | 
			
		||||
	const query = {
 | 
			
		||||
		deletedAt: null,
 | 
			
		||||
 | 
			
		||||
		// public only
 | 
			
		||||
		visibility: 'public',
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -45,6 +45,8 @@ export default (params: any, user: ILocalUser) => new Promise(async (res, rej) =
 | 
			
		|||
 | 
			
		||||
	// Construct query
 | 
			
		||||
	const query = {
 | 
			
		||||
		deletedAt: null,
 | 
			
		||||
 | 
			
		||||
		$or: [{
 | 
			
		||||
			mentions: user._id
 | 
			
		||||
		}, {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -132,6 +132,8 @@ export default async (params: any, user: ILocalUser) => {
 | 
			
		|||
 | 
			
		||||
	const query = {
 | 
			
		||||
		$and: [{
 | 
			
		||||
			deletedAt: null,
 | 
			
		||||
 | 
			
		||||
			// フォローしている人の投稿
 | 
			
		||||
			$or: followQuery,
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -137,6 +137,8 @@ export default async (params: any, user: ILocalUser) => {
 | 
			
		|||
 | 
			
		||||
	const query = {
 | 
			
		||||
		$and: [{
 | 
			
		||||
			deletedAt: null,
 | 
			
		||||
 | 
			
		||||
			// リストに入っている人のタイムラインへの投稿
 | 
			
		||||
			$or: listQuery,
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -136,6 +136,7 @@ export default (params: any, me: ILocalUser) => new Promise(async (res, rej) =>
 | 
			
		|||
	};
 | 
			
		||||
 | 
			
		||||
	const query = {
 | 
			
		||||
		deletedAt: null,
 | 
			
		||||
		userId: user._id
 | 
			
		||||
	} as any;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue