diff options
author | lonkaars <l.leblansch@gmail.com> | 2021-03-20 18:44:58 +0100 |
---|---|---|
committer | lonkaars <l.leblansch@gmail.com> | 2021-03-20 18:44:58 +0100 |
commit | eed11fd96cf1458a7a91659cdf5efafbadda1b2b (patch) | |
tree | d1f6cb2b070b9296f3fa15956307ddf4689e7aa3 /api/social/create_relation.py | |
parent | 62a3b7fbb4ffcaa16e0b4984d5fa0e59537af146 (diff) |
more event api
Diffstat (limited to 'api/social/create_relation.py')
-rw-r--r-- | api/social/create_relation.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/api/social/create_relation.py b/api/social/create_relation.py index eded25d..49bb4bc 100644 --- a/api/social/create_relation.py +++ b/api/social/create_relation.py @@ -1,6 +1,7 @@ from flask import Blueprint, request from db import cursor, connection from auth.login_token import token_login +from socket_io import io import time def create_relation(user_1_id, user_2_id, relation_type): @@ -31,6 +32,9 @@ def create_relation_route(relation_type): return "", 403 create_relation(user_1_id, user_2_id, relation_type) + if relation_type == "outgoing": + io.emit("incomingFriendRequest", room="user-"+user_2_id) + return "", 200 return route |