Search in sources :

Example 1 with ThreePidInviteReplyIO

use of io.kamax.mxisd.controller.identity.v1.io.ThreePidInviteReplyIO in project mxisd by kamax-io.

the class InvitationController method store.

@RequestMapping(value = "/store-invite", method = POST)
String store(HttpServletRequest request, @RequestParam String sender, @RequestParam String medium, @RequestParam String address, @RequestParam("room_id") String roomId) {
    Map<String, String> parameters = new HashMap<>();
    for (String key : request.getParameterMap().keySet()) {
        parameters.put(key, request.getParameter(key));
    }
    IThreePidInvite invite = new ThreePidInvite(new MatrixID(sender), medium, address, roomId, parameters);
    IThreePidInviteReply reply = mgr.storeInvite(invite);
    return gson.toJson(new ThreePidInviteReplyIO(reply, keyMgr.getPublicKeyBase64(keyMgr.getCurrentIndex()), srvCfg.getPublicUrl()));
}
Also used : ThreePidInvite(io.kamax.mxisd.invitation.ThreePidInvite) IThreePidInvite(io.kamax.mxisd.invitation.IThreePidInvite) HashMap(java.util.HashMap) ThreePidInviteReplyIO(io.kamax.mxisd.controller.identity.v1.io.ThreePidInviteReplyIO) IThreePidInvite(io.kamax.mxisd.invitation.IThreePidInvite) IThreePidInviteReply(io.kamax.mxisd.invitation.IThreePidInviteReply) MatrixID(io.kamax.matrix.MatrixID) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Aggregations

MatrixID (io.kamax.matrix.MatrixID)1 ThreePidInviteReplyIO (io.kamax.mxisd.controller.identity.v1.io.ThreePidInviteReplyIO)1 IThreePidInvite (io.kamax.mxisd.invitation.IThreePidInvite)1 IThreePidInviteReply (io.kamax.mxisd.invitation.IThreePidInviteReply)1 ThreePidInvite (io.kamax.mxisd.invitation.ThreePidInvite)1 HashMap (java.util.HashMap)1 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)1