ignoring alive messages
This commit is contained in:
		
							parent
							
								
									8bdc0738f9
								
							
						
					
					
						commit
						990ae6d8ec
					
				| 
						 | 
					@ -43,6 +43,8 @@ exports.save = async (ws, req) => {
 | 
				
			||||||
    ws.send('CAPTCHA - Please complete the captcha:')
 | 
					    ws.send('CAPTCHA - Please complete the captcha:')
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    ws.on('message', async function(msg) {
 | 
					    ws.on('message', async function(msg) {
 | 
				
			||||||
 | 
					        if (msg == 'alive') return 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (await redis.get(id) != 'downloading') {
 | 
					        if (await redis.get(id) != 'downloading') {
 | 
				
			||||||
            await redis.set(id, 'downloading')
 | 
					            await redis.set(id, 'downloading')
 | 
				
			||||||
            const confirm = await captcha.checkCaptcha(msg)
 | 
					            const confirm = await captcha.checkCaptcha(msg)
 | 
				
			||||||
| 
						 | 
					@ -99,6 +101,8 @@ exports.playlist = async (ws, req) => {
 | 
				
			||||||
    ws.send('CAPTCHA - Please complete the captcha:')
 | 
					    ws.send('CAPTCHA - Please complete the captcha:')
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    ws.on('message', async function(msg) {
 | 
					    ws.on('message', async function(msg) {
 | 
				
			||||||
 | 
					        if (msg == 'alive') return 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (status == 'captcha') {
 | 
					        if (status == 'captcha') {
 | 
				
			||||||
            status = 'downloading'
 | 
					            status = 'downloading'
 | 
				
			||||||
            const confirm = await captcha.checkCaptcha(msg)
 | 
					            const confirm = await captcha.checkCaptcha(msg)
 | 
				
			||||||
| 
						 | 
					@ -203,6 +207,8 @@ exports.channel = async (ws, req) => {
 | 
				
			||||||
    ws.send('CAPTCHA - Please complete the captcha:')
 | 
					    ws.send('CAPTCHA - Please complete the captcha:')
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    ws.on('message', async function(msg) {
 | 
					    ws.on('message', async function(msg) {
 | 
				
			||||||
 | 
					        if (msg == 'alive') return 
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
        if (status == 'captcha') {
 | 
					        if (status == 'captcha') {
 | 
				
			||||||
            status = 'downloading'
 | 
					            status = 'downloading'
 | 
				
			||||||
            const confirm = await captcha.checkCaptcha(msg)
 | 
					            const confirm = await captcha.checkCaptcha(msg)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue