mirror of
				https://codeberg.org/yeentown/barkey.git
				synced 2025-11-04 07:24:13 +00:00 
			
		
		
		
	* userListチャンネルのオーナーチェック Fix #5772 * comment
This commit is contained in:
		
							parent
							
								
									cff91a7674
								
							
						
					
					
						commit
						0c1076c917
					
				
					 1 changed files with 8 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -1,6 +1,6 @@
 | 
			
		|||
import autobind from 'autobind-decorator';
 | 
			
		||||
import Channel from '../channel';
 | 
			
		||||
import { Notes, UserListJoinings } from '../../../../models';
 | 
			
		||||
import { Notes, UserListJoinings, UserLists } from '../../../../models';
 | 
			
		||||
import shouldMuteThisNote from '../../../../misc/should-mute-this-note';
 | 
			
		||||
import { User } from '../../../../models/entities/user';
 | 
			
		||||
import { PackedNote } from '../../../../models/repositories/note';
 | 
			
		||||
| 
						 | 
				
			
			@ -17,6 +17,13 @@ export default class extends Channel {
 | 
			
		|||
	public async init(params: any) {
 | 
			
		||||
		this.listId = params.listId as string;
 | 
			
		||||
 | 
			
		||||
		// Check existence and owner
 | 
			
		||||
		const list = await UserLists.findOne({
 | 
			
		||||
			id: this.listId,
 | 
			
		||||
			userId: this.user!.id
 | 
			
		||||
		});
 | 
			
		||||
		if (!list) return;
 | 
			
		||||
 | 
			
		||||
		// Subscribe stream
 | 
			
		||||
		this.subscriber.on(`userListStream:${this.listId}`, this.send);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue