bb547d43af8d4e4d13b8c70662924895ae953215,dino/api.py,,on_invite,#Any#Any#,208
Before Change
:param activity: the parsed activity, supplied by @pre_process decorator, NOT by calling endpoint
:return: if ok: {"status_code": 200}, else: {"status_code": 400, "data": "<error message>"}
user_id = activity.actor.id
invitee = activity.target.id
invite_room = activity.actor.url
channel_id = activity.object.url
channel_name = utils.get_channel_name(channel_id)
invitee_name = utils.get_user_name_for(user_id)
room_name = utils.get_room_name(invite_room)
activity_json = utils.activity_for_invite(invitee, invitee_name, invite_room, room_name, channel_id, channel_name)
environ.env.emit("gn_invitation", activity_json, json=True, room=invitee)
After Change
:param activity: the parsed activity, supplied by @pre_process decorator, NOT by calling endpoint
:return: if ok: {"status_code": 200}, else: {"status_code": 400, "data": "<error message>"}
environ.env.observer.emit("on_invite", (data, activity))
return ECodes.OK, None
def on_request_admin(data: dict, activity: Activity) -> (int, None):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 9
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_invite
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_whisper
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_create