|  | @@ -280,6 +280,40 @@ def api_send_personal_message(user_id):
 | 
	
		
			
				|  |  |      db.session.commit()
 | 
	
		
			
				|  |  |      return json.dumps(True)
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +@app.route('/api/request/send_conference_message/<int:conference_id>', methods=["POST"])
 | 
	
		
			
				|  |  | +def api_send_conference_message(conference_id):
 | 
	
		
			
				|  |  | +    """Check key"""
 | 
	
		
			
				|  |  | +    if 'Authorization' not in request.headers:
 | 
	
		
			
				|  |  | +        return abort(403)
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    authorization = request.headers['authorization']
 | 
	
		
			
				|  |  | +    key = Key.query.filter(Key.key == authorization).first()
 | 
	
		
			
				|  |  | +    if not key or not key.active:
 | 
	
		
			
				|  |  | +        return abort(403)
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    if 'message' not in request.form:
 | 
	
		
			
				|  |  | +        return abort(400)
 | 
	
		
			
				|  |  | +    message = request.form['message']
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    log = Log()
 | 
	
		
			
				|  |  | +    log.date_time = datetime.now()
 | 
	
		
			
				|  |  | +    log.key_id = key.id
 | 
	
		
			
				|  |  | +    log.request_type = 'CM'
 | 
	
		
			
				|  |  | +    log.request_url = conference_id
 | 
	
		
			
				|  |  | +    db.session.add(log)
 | 
	
		
			
				|  |  | +    db.session.commit()
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    alt = request.args.get('alt')
 | 
	
		
			
				|  |  | +    if alt and alt.lower() == 'true':
 | 
	
		
			
				|  |  | +        alt_rrclient.send_conference_message(conference_id, message)
 | 
	
		
			
				|  |  | +    else:
 | 
	
		
			
				|  |  | +        rrclient.send_conference_message(conference_id, message)
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    log.succes = True
 | 
	
		
			
				|  |  | +    db.session.commit()
 | 
	
		
			
				|  |  | +    return json.dumps(True)
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  @app.route('/api/request/<path:url_path>', methods=["POST"])
 | 
	
		
			
				|  |  |  def api_post(url_path):
 | 
	
		
			
				|  |  |      """Check key"""
 |