@wireapp/protocol-messaging 1.54.0 → 1.56.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +2 -1
- package/proto/messages.proto +1 -0
- package/web/messages.d.ts +3 -1
- package/web/messages.js +37 -2
package/README.md
CHANGED
|
@@ -49,7 +49,7 @@ Message sent to recall previously sent message, can be only sent by original aut
|
|
|
49
49
|
|
|
50
50
|
### MessageEdit
|
|
51
51
|
If the content of a previously sent message should be edited, a generic message of type `MessageEdit` has to be sent.
|
|
52
|
-
It should reference the new content (for now only type `Text` can be edited) as well as the nonce of the message it is replacing. If an edit message is received which is referencing a non existent nonce it should be discarded.
|
|
52
|
+
It should reference the new content (for now only type `Text` and `Multipart` can be edited) as well as the nonce of the message it is replacing. If an edit message is received which is referencing a non existent nonce it should be discarded.
|
|
53
53
|
|
|
54
54
|
### Confirmation
|
|
55
55
|
If the reception of a previously sent message should be confirmed, a generic message of type `Confirmation` has to be sent. It should reference the message to be confirmed. Currently the confirmation comes in two flavours: `Read` and `Delivered`.
|
package/package.json
CHANGED
|
@@ -27,5 +27,6 @@
|
|
|
27
27
|
"preversion": "git checkout master && git pull && yarn && yarn dist && yarn test",
|
|
28
28
|
"test": "tsc --noEmit"
|
|
29
29
|
},
|
|
30
|
-
"version": "1.
|
|
30
|
+
"version": "1.56.0",
|
|
31
|
+
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
|
|
31
32
|
}
|
package/proto/messages.proto
CHANGED
package/web/messages.d.ts
CHANGED
|
@@ -542,6 +542,7 @@ export interface IMessageEdit {
|
|
|
542
542
|
replacingMessageId: string;
|
|
543
543
|
text?: (IText|null);
|
|
544
544
|
composite?: (IComposite|null);
|
|
545
|
+
multipart?: (IMultipart|null);
|
|
545
546
|
}
|
|
546
547
|
|
|
547
548
|
export class MessageEdit implements IMessageEdit {
|
|
@@ -549,7 +550,8 @@ export class MessageEdit implements IMessageEdit {
|
|
|
549
550
|
public replacingMessageId: string;
|
|
550
551
|
public text?: (IText|null);
|
|
551
552
|
public composite?: (IComposite|null);
|
|
552
|
-
public
|
|
553
|
+
public multipart?: (IMultipart|null);
|
|
554
|
+
public content?: ("text"|"composite"|"multipart");
|
|
553
555
|
public static create(properties?: IMessageEdit): MessageEdit;
|
|
554
556
|
public static encode(message: IMessageEdit, writer?: $protobuf.Writer): $protobuf.Writer;
|
|
555
557
|
public static encodeDelimited(message: IMessageEdit, writer?: $protobuf.Writer): $protobuf.Writer;
|
package/web/messages.js
CHANGED
|
@@ -6374,6 +6374,7 @@ $root.MessageEdit = (function() {
|
|
|
6374
6374
|
* @property {string} replacingMessageId MessageEdit replacingMessageId
|
|
6375
6375
|
* @property {IText|null} [text] MessageEdit text
|
|
6376
6376
|
* @property {IComposite|null} [composite] MessageEdit composite
|
|
6377
|
+
* @property {IMultipart|null} [multipart] MessageEdit multipart
|
|
6377
6378
|
*/
|
|
6378
6379
|
|
|
6379
6380
|
/**
|
|
@@ -6415,17 +6416,25 @@ $root.MessageEdit = (function() {
|
|
|
6415
6416
|
*/
|
|
6416
6417
|
MessageEdit.prototype.composite = null;
|
|
6417
6418
|
|
|
6419
|
+
/**
|
|
6420
|
+
* MessageEdit multipart.
|
|
6421
|
+
* @member {IMultipart|null|undefined} multipart
|
|
6422
|
+
* @memberof MessageEdit
|
|
6423
|
+
* @instance
|
|
6424
|
+
*/
|
|
6425
|
+
MessageEdit.prototype.multipart = null;
|
|
6426
|
+
|
|
6418
6427
|
// OneOf field names bound to virtual getters and setters
|
|
6419
6428
|
var $oneOfFields;
|
|
6420
6429
|
|
|
6421
6430
|
/**
|
|
6422
6431
|
* MessageEdit content.
|
|
6423
|
-
* @member {"text"|"composite"|undefined} content
|
|
6432
|
+
* @member {"text"|"composite"|"multipart"|undefined} content
|
|
6424
6433
|
* @memberof MessageEdit
|
|
6425
6434
|
* @instance
|
|
6426
6435
|
*/
|
|
6427
6436
|
Object.defineProperty(MessageEdit.prototype, "content", {
|
|
6428
|
-
get: $util.oneOfGetter($oneOfFields = ["text", "composite"]),
|
|
6437
|
+
get: $util.oneOfGetter($oneOfFields = ["text", "composite", "multipart"]),
|
|
6429
6438
|
set: $util.oneOfSetter($oneOfFields)
|
|
6430
6439
|
});
|
|
6431
6440
|
|
|
@@ -6458,6 +6467,8 @@ $root.MessageEdit = (function() {
|
|
|
6458
6467
|
$root.Text.encode(message.text, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
|
6459
6468
|
if (message.composite != null && Object.hasOwnProperty.call(message, "composite"))
|
|
6460
6469
|
$root.Composite.encode(message.composite, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
|
|
6470
|
+
if (message.multipart != null && Object.hasOwnProperty.call(message, "multipart"))
|
|
6471
|
+
$root.Multipart.encode(message.multipart, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
|
|
6461
6472
|
return writer;
|
|
6462
6473
|
};
|
|
6463
6474
|
|
|
@@ -6504,6 +6515,10 @@ $root.MessageEdit = (function() {
|
|
|
6504
6515
|
message.composite = $root.Composite.decode(reader, reader.uint32());
|
|
6505
6516
|
break;
|
|
6506
6517
|
}
|
|
6518
|
+
case 4: {
|
|
6519
|
+
message.multipart = $root.Multipart.decode(reader, reader.uint32());
|
|
6520
|
+
break;
|
|
6521
|
+
}
|
|
6507
6522
|
default:
|
|
6508
6523
|
reader.skipType(tag & 7);
|
|
6509
6524
|
break;
|
|
@@ -6562,6 +6577,16 @@ $root.MessageEdit = (function() {
|
|
|
6562
6577
|
return "composite." + error;
|
|
6563
6578
|
}
|
|
6564
6579
|
}
|
|
6580
|
+
if (message.multipart != null && message.hasOwnProperty("multipart")) {
|
|
6581
|
+
if (properties.content === 1)
|
|
6582
|
+
return "content: multiple values";
|
|
6583
|
+
properties.content = 1;
|
|
6584
|
+
{
|
|
6585
|
+
var error = $root.Multipart.verify(message.multipart);
|
|
6586
|
+
if (error)
|
|
6587
|
+
return "multipart." + error;
|
|
6588
|
+
}
|
|
6589
|
+
}
|
|
6565
6590
|
return null;
|
|
6566
6591
|
};
|
|
6567
6592
|
|
|
@@ -6589,6 +6614,11 @@ $root.MessageEdit = (function() {
|
|
|
6589
6614
|
throw TypeError(".MessageEdit.composite: object expected");
|
|
6590
6615
|
message.composite = $root.Composite.fromObject(object.composite);
|
|
6591
6616
|
}
|
|
6617
|
+
if (object.multipart != null) {
|
|
6618
|
+
if (typeof object.multipart !== "object")
|
|
6619
|
+
throw TypeError(".MessageEdit.multipart: object expected");
|
|
6620
|
+
message.multipart = $root.Multipart.fromObject(object.multipart);
|
|
6621
|
+
}
|
|
6592
6622
|
return message;
|
|
6593
6623
|
};
|
|
6594
6624
|
|
|
@@ -6619,6 +6649,11 @@ $root.MessageEdit = (function() {
|
|
|
6619
6649
|
if (options.oneofs)
|
|
6620
6650
|
object.content = "composite";
|
|
6621
6651
|
}
|
|
6652
|
+
if (message.multipart != null && message.hasOwnProperty("multipart")) {
|
|
6653
|
+
object.multipart = $root.Multipart.toObject(message.multipart, options);
|
|
6654
|
+
if (options.oneofs)
|
|
6655
|
+
object.content = "multipart";
|
|
6656
|
+
}
|
|
6622
6657
|
return object;
|
|
6623
6658
|
};
|
|
6624
6659
|
|