Documentation
Backend integration
When a chat participant requests the message list or sends a new message, a permissions request is sent each time.
Chats send a request:
http
GET {application validateEndpoint}?chat={chat id}&participant={participant id}If the user has access to the chat, you must return status 200. For any other status, the user will not be granted access to that chat.
Code example:
java
@RestController
@RequestMapping("/validate-participant")
public class ValidateParticipant {
@GetMapping()
public ResponseEntity<Void> validateTest(@RequestParam final String chat,
@RequestParam final String participant) {
// Perform various access checks
boolean accessAllowed = YourService.checkPermission(chat, participant);
if (accessAllowed)
return ResponseEntity.ok().build();
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
}