Skip to content

Commit

Permalink
Only one user. no references to usernameS or userS_idS
Browse files Browse the repository at this point in the history
  • Loading branch information
Bruno Geninatti committed Mar 2, 2018
1 parent 44fa8e6 commit 2574e5a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions Cardenal/zmq_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ def check_msgs(self):
Tiene que recibir un diccionario json con las siguientes claves:
user_id: int,
username: text,
usernames: list,
users_ids: list,
msg: text
Se debe especificar user_id o username. Si ambos están presentes se
usa username
Expand All @@ -66,7 +64,7 @@ def check_msgs(self):
self.logger.error("ERROR 501: No se especifico un mensaje para la notificación.")
continue

if all((k not in ('username', 'usernames', 'user_id', 'users_ids') for k in msg.keys())):
if all((k not in ('username', 'user_id') for k in msg.keys())):
socket.send_string(json.dumps({
'status': 502,
'msg': 'No se especifico ningún destinatario para el ' +
Expand Down

0 comments on commit 2574e5a

Please sign in to comment.