fix message model
This commit is contained in:
		
							parent
							
								
									f030b13bf5
								
							
						
					
					
						commit
						16099a7b24
					
				| @ -125,8 +125,9 @@ export interface Attachment { | ||||
| 	size: number; // size of file in bytes
 | ||||
| 	url: string; // source url of file
 | ||||
| 	proxy_url: string; // a proxied url of file
 | ||||
| 	height: number; // height of file (if image)
 | ||||
| 	width: number; // width of file (if image)
 | ||||
| 	height?: number; // height of file (if image)
 | ||||
| 	width?: number; // width of file (if image)
 | ||||
| 	content_type?: string; | ||||
| } | ||||
| 
 | ||||
| export interface Embed { | ||||
| @ -205,6 +206,7 @@ export const Attachment = { | ||||
| 	proxy_url: String, // a proxied url of file
 | ||||
| 	height: Number, // height of file (if image)
 | ||||
| 	width: Number, // width of file (if image)
 | ||||
| 	content_type: String, | ||||
| }; | ||||
| 
 | ||||
| export const EmbedImage = { | ||||
|  | ||||
| @ -8,7 +8,7 @@ export function checkToken(token: string, jwtSecret: string): Promise<any> { | ||||
| 			if (err || !decoded) return rej("Invalid Token"); | ||||
| 
 | ||||
| 			const user = await UserModel.findOne({ id: decoded.id }, { "user_data.valid_tokens_since": true }).exec(); | ||||
| 			if (!user) return rej("User not found"); | ||||
| 			if (!user) return rej("Invalid Token"); | ||||
| 			if (decoded.iat * 1000 < user.user_data.valid_tokens_since.getTime()) return rej("Invalid Token"); | ||||
| 			if (user.disabled) return rej("User disabled"); | ||||
| 			if (user.deleted) return rej("User not found"); | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Flam3rboy
						Flam3rboy