Class MatrixRest

java.lang.Object
io.meeds.chat.rest.MatrixRest
All Implemented Interfaces:
org.exoplatform.services.rest.resource.ResourceContainer

@RestController @RequestMapping("/matrix") public class MatrixRest extends Object implements org.exoplatform.services.rest.resource.ResourceContainer
  • Constructor Details

    • MatrixRest

      public MatrixRest()
  • Method Details

    • getMatrixRoomBySpaceId

      @GetMapping @Secured("users") public String getMatrixRoomBySpaceId(@RequestParam(name="spaceId") String spaceId)
    • getDirectMessagingRoom

      @GetMapping("dmRoom") @Secured("users") public RoomEntity getDirectMessagingRoom(jakarta.servlet.http.HttpServletRequest request, @RequestParam(name="firstParticipant") String firstParticipant, @RequestParam(name="secondParticipant") String secondParticipant)
    • getDirectMessagingRoom

      @PostMapping @Secured("users") public RoomEntity getDirectMessagingRoom(jakarta.servlet.http.HttpServletRequest request, @RequestBody Room room)
    • notify

      @PostMapping("notify") public String notify(@RequestBody String notification)
    • linkSpaceToRoom

      @GetMapping("linkRoom") @Secured("users") public boolean linkSpaceToRoom(@RequestParam("spaceGroupId") String spaceGroupId, @RequestParam(name="roomId") String roomId, @RequestParam(name="create",required=false) Boolean create)
    • getUserDirectMessagingRooms

      @GetMapping("dmRooms") @Secured("users") public Map<String,String[]> getUserDirectMessagingRooms(@RequestParam(name="user") String user)
    • getByRoomId

      @GetMapping("byRoom") @Secured("users") public String getByRoomId(@RequestParam(name="roomId") String roomId)
    • getIdentityByUserMatrixId

      @GetMapping("userByMatrixId") @Secured("users") public org.springframework.http.ResponseEntity<org.exoplatform.social.rest.entity.IdentityEntity> getIdentityByUserMatrixId(jakarta.servlet.http.HttpServletRequest request, org.springframework.web.context.request.WebRequest webRequest, @RequestParam(name="userMatrixId") String userMatrixId)
    • processRooms

      @PostMapping("processRooms") @Secured("users") public org.springframework.http.ResponseEntity<RoomList> processRooms(jakarta.servlet.http.HttpServletRequest request, @RequestBody RoomList rooms)
    • updatePresenceStatus

      @PutMapping("setStatus") @Secured("users") public org.springframework.http.ResponseEntity<String> updatePresenceStatus(@RequestBody Presence presence)
    • processRooms

      public RoomList processRooms(RoomList roomList, String currentUserName)
      Process the Matrix rooms and adds the missing information of users and spaces
      Parameters:
      roomList - the room list received from Matrix par sync API
      currentUserName - the current user
      Returns:
      the roo List after processing
    • processRoom

      public RoomEntity processRoom(RoomEntity room, String currentUserName)