feat: Chat request implementation #14

Manually merged
awiteb merged 55 commits from awiteb/chat-request-and-response into master 2024-07-18 14:21:39 +02:00 AGit
Showing only changes of commit 8333a6ba9a - Show all commits

View file

@ -22,8 +22,15 @@ use crate::ws_errors;
pub type WsResult<T> = Result<T, WsError>;
ws_errors! {
InternalServerError = "Internal server error",
InvalidSignature = "Invalid event signature",
NotTextMessage = "The websocket message must be text message",
InvalidJsonData = "Received invalid json data, the text must be valid json",
UnknownClientEvent = "Unknown client event, the event is not recognized by the server",
RegistredUserEvent = "The event is only for registred users",
UserNotFound = "The user is not registered in the server",
AlreadyOnTheWhitelist = "The user is already on your whitelist",
AlreadySendChatRequest = "You have already sent a chat request to this user",
CannotSendChatRequestToSelf = "You cannot send a chat request to yourself",
CannotAddSelfToWhitelist = "You cannot add yourself to the whitelist",
}