From 8fffa2cc64042fb12dbbac26a98e5d1f4c3463bf Mon Sep 17 00:00:00 2001 From: ChronosX88 Date: Wed, 20 Nov 2019 17:35:38 +0400 Subject: [PATCH] Accept server ID purpose (from mail lists thread) for EntityID --- protocol-spec/core.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/protocol-spec/core.md b/protocol-spec/core.md index aebe627..16293f2 100644 --- a/protocol-spec/core.md +++ b/protocol-spec/core.md @@ -22,10 +22,15 @@ For starting we simply use JSON + Websockets. * Room ID: `!@` * Single server-part: `` -**Server-part (hostname)** - `IPv4 / [IPv6] / dns-domain:`. +**Server-part**: +- hostname: `IPv4 / [IPv6] / dns-domain:` (for end-users use) +- server ID: static SHA256 hash string from 4096 characters (for internal protocol use) + **Username/Room alias/RoomID** - MUST NOT be empty, and MUST contain only the characters `a-z`, `0-9`, `.`, `_`, `=`, `-`, and `/`. -RoomID SHOULD be UUID identifier. +**Special business rules**: +- RoomID SHOULD be UUID identifier. +- Servers MUST use server ID in internal purposes instead of normal server-part with hostname. Only end-users MUST use normal server-part with hostname. This is done for easy multi-domain serving. ## BaseMessage BaseMessage is a basic message model, basis of the whole protocol. It is used for a very easy protocol extension process. @@ -85,7 +90,7 @@ Adds into type name `:error` postfix. ## Account registration/login ### Create account **Description**: Create user account on a server -**Type**: `profile:register` +**Type**: `profile:register` **Payload**: - Request: - `username: string` - the username that the user wants to register