예제 #1
0
def on_accept_contact_request(self, sender, receiver, request_id, message=None):
    """
    同意联系人申请
    :param self:
    :param sender:
    :param receiver:
    :param request_id:
    :return:
    """
    from viae.job import send_contact_notif

    message = message or u'%s已经拒绝了你的好友申请。' % sender['nickname']
    send_contact_notif.__call__(sender, receiver, 'F_AGREE', request_id, message)
예제 #2
0
def on_send_contact_request(self, sender, receiver, request_id, message=None):
    """
    发送联系人申请
    :param self:
    :param sender:
    :param receiver:
    :param request_id:
    :return:
    """
    from viae.job import send_contact_notif

    message = message or u'%s请求添加你为好友。' % sender['nickname']
    send_contact_notif.__call__(sender, receiver, 'F_ADD', request_id, message)