Exemplo n.º 1
0
 def addReactions(self, form):
     print(form)
     uid = form['uid']
     mid = form['mid']
     gid = form['gid']
     type = form['type']
     MessagesDAO().addReactions(uid, mid, type)
     result = buildDict.build_reaction_dict_by_attr(self, uid, mid, type)
     return GroupChatsHandler().getMessagesByGroupChatId(gid)
Exemplo n.º 2
0
def getUsersInAGroupChat(gid):
    if request.method == 'GET':
        return GroupChatsHandler().getUsersInAGroupChat(gid)
    else:
        return GroupChatsHandler().addUsersToGroupChat(gid, request.json)
Exemplo n.º 3
0
def getAllGroupChats():
    return GroupChatsHandler().getAllGroupChats()
Exemplo n.º 4
0
def MessagesByHashTagInGroup(gid, hstring):
    return GroupChatsHandler().getMessagesByHashTagInGroup(gid, hstring)
Exemplo n.º 5
0
def getMessagesByGroupChatId(gid):
    if request.method == 'GET':
        return GroupChatsHandler().getMessagesByGroupChatId(gid)
    else:
        return GroupChatsHandler().postMessage(gid, request.json)
Exemplo n.º 6
0
def replyToMessageGroupChatId(gid):
    if request.method == 'POST':
        return GroupChatsHandler().replyToMessage(gid, request.json)
Exemplo n.º 7
0
def availableGroupChats(uid):
    if request.method == 'GET':
        return GroupChatsHandler().availableGroupChats(uid)
    else:
        print("main")
        return GroupChatsHandler().createGroupChat(uid, request.json)
Exemplo n.º 8
0
def getOwnerOfGroupChat(gid):
    return GroupChatsHandler().getOwnerOfGroupChat(gid)