|
@@ -421,7 +421,10 @@ async def getUsersStates():
|
|
|
else:
|
|
else:
|
|
|
states[user] = pStates[user]
|
|
states[user] = pStates[user]
|
|
|
else:
|
|
else:
|
|
|
- states[user] = uState
|
|
|
|
|
|
|
+ if uState in ('unavailable', 'ringing'):
|
|
|
|
|
+ states[user] = uState
|
|
|
|
|
+ else:
|
|
|
|
|
+ states[user] = 'busy'
|
|
|
return states
|
|
return states
|
|
|
|
|
|
|
|
@app.route('/atxfer/<userA>/<userB>')
|
|
@app.route('/atxfer/<userA>/<userB>')
|
|
@@ -456,7 +459,7 @@ class UsersStates(Resource):
|
|
|
@app.response(HTTPStatus.UNAUTHORIZED, 'Authorization required')
|
|
@app.response(HTTPStatus.UNAUTHORIZED, 'Authorization required')
|
|
|
async def get(self):
|
|
async def get(self):
|
|
|
'''Returns all users with their states.
|
|
'''Returns all users with their states.
|
|
|
- Possible states are: available, away, dnd, inuse, busy, unavailable, ringing, inuse&ringing, hold, inuse&hold
|
|
|
|
|
|
|
+ Possible states are: available, away, dnd, inuse, busy, unavailable, ringing
|
|
|
'''
|
|
'''
|
|
|
return await getUsersStates()
|
|
return await getUsersStates()
|
|
|
|
|
|