From 1cd3b60334c8e4f9f6b16df457ec9ca38c4841b7 Mon Sep 17 00:00:00 2001 From: ChronosX88 Date: Fri, 3 Jan 2020 14:16:58 +0400 Subject: [PATCH] SPEC-4: Update --- CPPs/proposed/CPP3 - Private user messages.md | 27 +++++++----------- ...PP3 - Message Mindmap.png => CPP3-img.png} | Bin 2 files changed, 10 insertions(+), 17 deletions(-) rename CPPs/proposed/{CPP3 - Message Mindmap.png => CPP3-img.png} (100%) diff --git a/CPPs/proposed/CPP3 - Private user messages.md b/CPPs/proposed/CPP3 - Private user messages.md index e1e9a2a..2691424 100644 --- a/CPPs/proposed/CPP3 - Private user messages.md +++ b/CPPs/proposed/CPP3 - Private user messages.md @@ -4,7 +4,7 @@ This proposal introduces the concept of chats (this proposal describes only private chats) and a mechanism for sending/receiving messages in the chat. -![Message Mindmap](CPP3 - Message Mindmap.png) +![Message Mindmap](./CPP3-img.png) ## Message type identifiers @@ -33,10 +33,9 @@ Note: C - client, S - server "id": "abcd", "type": "chat:create", "from": "@user1@cadmium.im", - "to": "cadmium.im", + "to": "@user2@cadmium.im", "payload": { - "chatType": "user", - "receiverUserId": "@user2@cadmium.im" + "chatType": "user" } } ``` @@ -78,12 +77,11 @@ Error response (S): { "id": "abcd", "type": "chat:created", - "from": "cadmium.im", + "from": "@user1@cadmium.im", "to": "@user2@cadmium.im", "ok": true, "payload": { - "roomId": "!22c5d942-22bc-45b3-9541-ec2b49afe5ec@cadmium.im", - "creatorUserId": "@user1@cadmium.im" + "roomId": "!22c5d942-22bc-45b3-9541-ec2b49afe5ec@cadmium.im" } } ``` @@ -111,7 +109,7 @@ Error response (S): { "id": "abcd", "type": "message:send", - "from": "cadmium.im", + "from": "!22c5d942-22bc-45b3-9541-ec2b49afe5ec@cadmium.im", "to": "@user1@cadmium.im", "ok": true, "payload": { @@ -127,7 +125,7 @@ Error response (S): { "id": "abcd", "type": "message:receive", - "from": "cadmium.im", + "from": "!22c5d942-22bc-45b3-9541-ec2b49afe5ec@cadmium.im", "to": "@user2@cadmium.im", "ok": true, "payload": { @@ -160,7 +158,7 @@ Error response (S): { "id": "abcd", "type": "message:read", - "from": "cadmium.im", + "from": "!22c5d942-22bc-45b3-9541-ec2b49afe5ec@cadmium.im", "to": "@user2@cadmium.im", "ok": true, "payload": {} @@ -173,7 +171,7 @@ Error response (S): { "id": "abcd", "type": "message:receive:read", - "from": "cadmium.im", + "from": "!22c5d942-22bc-45b3-9541-ec2b49afe5ec@cadmium.im", "to": "@user1@cadmium.im", "ok": true, "payload": { @@ -238,12 +236,7 @@ interface CreatePrivateChatNotificationPayload { /** * Identifier of newly created chat */ - roomId: EntityID, - - /** - * Identifier of user which created this chat - */ - creatorUserId: EntityID + roomId: EntityID } ``` diff --git a/CPPs/proposed/CPP3 - Message Mindmap.png b/CPPs/proposed/CPP3-img.png similarity index 100% rename from CPPs/proposed/CPP3 - Message Mindmap.png rename to CPPs/proposed/CPP3-img.png