Exemple #1
0
def friend_request(tox, public_key, message, message_size, user_data):
    """
    Called when user get new friend request
    """
    profile = Bot.get_instance()
    key = ''.join(chr(x) for x in public_key[:TOX_PUBLIC_KEY_SIZE])
    tox_id = bin_to_string(key, TOX_PUBLIC_KEY_SIZE)
    profile.process_friend_request(tox_id, message.decode('utf-8'))
Exemple #2
0
def friend_request(tox, public_key, message, message_size, user_data):
    """
    Called when user get new friend request
    """
    profile = Bot.get_instance()
    key = ''.join(chr(x) for x in public_key[:TOX_PUBLIC_KEY_SIZE])
    tox_id = bin_to_string(key, TOX_PUBLIC_KEY_SIZE)
    profile.process_friend_request(tox_id, message.decode('utf-8'))
Exemple #3
0
def friend_request(tox,public_key, message, message_size, user_data):
    """
    Called when user get new friend request
    """
    key = ''.join(chr(x) for x in public_key[:TOX_PUBLIC_KEY_SIZE])
    tox_id = bin_to_string(key, TOX_PUBLIC_KEY_SIZE)
    #profile.process_friend_request(tox_id, message.decode('utf-8'))
    print('Dugum baglantı isteği:', message)
    open("yenidugum","w").write(tox_id)
Exemple #4
0
def friend_request(tox, public_key, message, message_size, user_data):
    """
    Called when user get new friend request
    """
    key = ''.join(chr(x) for x in public_key[:TOX_PUBLIC_KEY_SIZE])
    tox_id = bin_to_string(key, TOX_PUBLIC_KEY_SIZE)
    #profile.process_friend_request(tox_id, message.decode('utf-8'))
    print('Dugum baglantı isteği:', message)
    open("yenidugum", "w").write(tox_id)
Exemple #5
0
def friend_request(tox, public_key, message, message_size, user_data):
    """
    Called when user get new friend request
    """
    print('Friend request')
    profile = Profile.get_instance()
    key = ''.join(chr(x) for x in public_key[:TOX_PUBLIC_KEY_SIZE])
    tox_id = bin_to_string(key, TOX_PUBLIC_KEY_SIZE)
    if tox_id not in Settings.get_instance()['blocked']:
        invoke_in_main_thread(profile.process_friend_request, tox_id, str(message, 'utf-8'))
Exemple #6
0
def friend_request(tox, public_key, message, message_size, user_data):
    """
    Called when user get new friend request
    """
    print('Friend request')
    profile = Profile.get_instance()
    key = ''.join(chr(x) for x in public_key[:TOX_PUBLIC_KEY_SIZE])
    tox_id = bin_to_string(key, TOX_PUBLIC_KEY_SIZE)
    if tox_id not in Settings.get_instance()['blocked']:
        invoke_in_main_thread(profile.process_friend_request, tox_id, str(message, 'utf-8'))