From df3fdf38d1b03287572aa719d899de7eb99deafa Mon Sep 17 00:00:00 2001 From: Moxie Marlinspike Date: Wed, 2 Apr 2014 11:51:35 -0700 Subject: [PATCH] Updated API Protocol (markdown) --- API-Protocol.md | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/API-Protocol.md b/API-Protocol.md index 8773b96..0ccaa9a 100644 --- a/API-Protocol.md +++ b/API-Protocol.md @@ -156,15 +156,34 @@ Messages bodies sent and received by clients are a protocol buffer structure: ``` message PushMessageContent { - optional string body = 1; - message AttachmentPointer { - optional fixed64 id = 1; - optional string contentType = 2; - optional bytes key = 3; + optional fixed64 id = 1; + optional string contentType = 2; + optional bytes key = 3; } + message GroupContext { + enum Type { + UNKNOWN = 0; + UPDATE = 1; + DELIVER = 2; + QUIT = 3; + } + optional bytes id = 1; + optional Type type = 2; + optional string name = 3; + repeated string members = 4; + optional AttachmentPointer avatar = 5; + } + + enum Flags { + END_SESSION = 1; + } + + optional string body = 1; repeated AttachmentPointer attachments = 2; + optional GroupContext group = 3; + optional Flags flags = 4; } ```