ChatController

@RestController
@RequestMapping(value = ["/api/v2/flow/chats"])
class ChatController(chatService: ChatService)(source)

Constructors

Link copied to clipboard
constructor(chatService: ChatService)

Functions

Link copied to clipboard
@GetMapping(value = ["/{contactId}/messages"])
fun getHistory(@PathVariable contactId: String, @PageableDefault(size = 50) pageable: Pageable): Page<ChatMessageDTO>
Link copied to clipboard
@GetMapping
fun getInbox(@PageableDefault(size = 20) pageable: Pageable): Page<ChatInboxDTO>
Link copied to clipboard
@PostMapping(value = ["/{contactId}/read"])
@ResponseStatus(value = HttpStatus.NO_CONTENT)
fun markAsRead(@PathVariable contactId: String)
Link copied to clipboard
@PostMapping(value = ["/send"], consumes = ["multipart/form-data"])
fun sendMessage(@RequestPart(value = "data") @Valid request: SendMessageRequest, @RequestPart(value = "file", required = false) file: MultipartFile?): ResponseEntity<Message>