def getMessagesFromGroupChatById(userid, groupchatid, messageid):
    if request.method == 'PUT':
        return ChatHandler().updateMessage(userid, groupchatid, messageid, request.json)
    elif request.method == 'GET':
        return ChatHandler().getMessageFromGroupChatById(userid, groupchatid, messageid)
    else:
        return ChatHandler().deleteMessage(groupchatid, messageid)
def getGroupChatById(userid, groupchatid):
    if request.method == 'PUT':
        return ChatHandler().updateGroupChat(groupchatid, request.json)
    elif request.method == 'DELETE':
        return ChatHandler().deleteGroupChat(groupchatid)
    else:
        return ChatHandler().getGroupChatById(groupchatid)
def getRepliesById(userid, groupchatid, messageid, replyid):
    if request.method == 'PUT':
        return ChatHandler().updateReply(userid, groupchatid, messageid, replyid, request.json)
    elif request.method == 'DELETE':
        return ChatHandler().deleteReply(userid, groupchatid, messageid, replyid)
    else:
        return ChatHandler().getReplyById(userid, groupchatid, messageid, replyid)
def getMessageReactionsById(userid, groupchatid, messageid, rid):
    if request.method == 'PUT':
        return ChatHandler().updateReaction(groupchatid, messageid, rid, request.json)

    elif request.method == 'DELETE':
        return ChatHandler().deleteReaction(groupchatid, messageid, rid)
    else:
        return ChatHandler().getMessageReactionsById(userid, groupchatid, messageid, rid)
def getMessagesByHashtagStringInGroupChat(userid, groupchatid, hashtagstring):
        return ChatHandler().getMessagesByHashtagStringInGroupChat(userid, groupchatid, hashtagstring)
def getAvailableGroupChatsByUserId(userid):
    if request.method == 'GET':
        return ChatHandler().getAvailableGroupChatsByUserId(userid)
    else:
        return ChatHandler().createGroupChat(userid, request.json)
def getGroupChatInfoById(groupchatid):
    return ChatHandler().getGroupChatInfoById(groupchatid)
def getMessageDislikesInGroupChatByUserIdAndGroupChatIdAndMessageId(userid,groupchatid, messageid):
    if request.method == 'GET':
        return ChatHandler().getMessageDislikesInGroupChatByUserIdGroupChatIdAndMessageId(userid,groupchatid, messageid)
def deleteUserFromGroupChatById(userid, userid2, groupchatid):
    if request.method == 'DELETE':
        return ChatHandler().deleteUserFromGroupChatById(userid, userid2, groupchatid)
    else:
        return jsonify(Error="Method not allowed."), 405
Exemplo n.º 10
0
def getUsersInGroupChatByUserIdAndGroupChatId(userid, groupchatid):
    if request.method == 'GET':
        return UserHandler().getUsersInGroupChatByUserIdAndGroupChatId(userid, groupchatid)
    else:
        return ChatHandler().addUserToGroupChat(userid, groupchatid, request.json)
Exemplo n.º 11
0
def getRepliesFromMessageInGroupChatByUserIdAndGroupChatIdAndMessageId(userid, groupchatid, messageid):
    if request.method == 'POST':
        return ChatHandler().replyToMessageInGroupChatByUserIdAndGroupChatIdAndMessageId(userid, groupchatid, messageid, request.json)

    else:
        return ChatHandler().getRepliesFromMessageInGroupChatByUserIdAndGroupChatIdAndMessageId(userid, groupchatid, messageid)
Exemplo n.º 12
0
def getMessageDislikesByMessageId(messageid):
    return ChatHandler().getMessageDislikesByMessageId(messageid)
Exemplo n.º 13
0
def getAllGroupChats():
    return ChatHandler().getAllGroupChats()
Exemplo n.º 14
0
def getAllMessages():
    return ChatHandler().getAllMessages()
Exemplo n.º 15
0
def getMessageReactionsInGroupChatByUserIdAndGroupChatIdAndMessageId(userid, groupchatid, messageid):
    if request.method == 'GET':
        return ChatHandler().getMessageReactionsInGroupChatByUserIdAndGroupChatIdAndMessageId(userid, groupchatid, messageid)

    else:
        return ChatHandler().addReaction(userid, groupchatid, messageid, request.json)
Exemplo n.º 16
0
def getMessagesFromGroupChatByUserIdAndGroupChatId(userid, groupchatid):
    if request.method == 'GET':
        return ChatHandler().getMessagesFromGroupChatByUserIdAndGroupChatId(userid, groupchatid)
    else:
        return ChatHandler().insertMessage(userid, groupchatid, request.json)