bb547d43af8d4e4d13b8c70662924895ae953215,dino/api.py,,on_ban,#Any#Any#,132
Before Change
try:
utils.ban_user(room_id, kicked_id, ban_duration)
except NoSuchRoomException as e:
return ECodes.NO_SUCH_ROOM, "no private room found for user: %s" % str(e)
except NoSuchUserException as e:
return ECodes.NO_SUCH_USER, "could not find the specified user: %s" % str(e)
_kick_user(activity)
After Change
:return: if ok: {"status_code": 200}, else: {"status_code": 400, "data": "<error message>"}
environ.env.observer.emit("on_ban", (data, activity))
environ.env.observer.emit("on_kick", (data, activity))
return ECodes.OK, None
def on_kick(data: dict, activity: Activity) -> (int, None):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 2
Instances
Project Name: thenetcircle/dino
Commit Name: bb547d43af8d4e4d13b8c70662924895ae953215
Time: 2016-12-12
Author: oscar.eriks@gmail.com
File Name: dino/api.py
Class Name:
Method Name: on_ban
Project Name: thenetcircle/dino
Commit Name: 930f98eab72c07f9d36036fde859978b58605128
Time: 2017-10-18
Author: oscar.eriks@gmail.com
File Name: dino/validation/request.py
Class Name: RequestValidator
Method Name: on_login
Project Name: thenetcircle/dino
Commit Name: 8bdeda7f5f3c0838c759002c39a9d254913a7657
Time: 2016-11-11
Author: oscar.eriks@gmail.com
File Name: dino/api.py
Class Name:
Method Name: on_create