@wireapp/protocol-messaging 1.48.0 → 1.50.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/package.json +1 -1
- package/proto/messages.proto +15 -0
- package/web/messages.d.ts +33 -1
- package/web/messages.js +340 -3
package/package.json
CHANGED
package/proto/messages.proto
CHANGED
|
@@ -46,6 +46,17 @@ message GenericMessage {
|
|
|
46
46
|
ButtonAction buttonAction = 21;
|
|
47
47
|
ButtonActionConfirmation buttonActionConfirmation = 22;
|
|
48
48
|
DataTransfer dataTransfer = 23; // client-side synchronization across devices of the same user
|
|
49
|
+
InCallEmoji inCallEmoji = 24;
|
|
50
|
+
// UnknownStrategy unknownStrategy = 25; -- Defined outside the oneof
|
|
51
|
+
// Next field should be 26 ↓
|
|
52
|
+
}
|
|
53
|
+
optional UnknownStrategy unknownStrategy = 25 [default = IGNORE];
|
|
54
|
+
|
|
55
|
+
// See internal RFC: "2024-07-18 RFC Improve future-proofing for new OTR message types"
|
|
56
|
+
enum UnknownStrategy {
|
|
57
|
+
IGNORE = 0; // Ignore the message completely. Trash. Bye
|
|
58
|
+
DISCARD_AND_WARN = 1; // Warn the user, but discard the message, as it won't be helpful in the future.
|
|
59
|
+
WARN_USER_ALLOW_RETRY = 2; // Warn the user. Client has freedom to store it and retry in the future.
|
|
49
60
|
}
|
|
50
61
|
}
|
|
51
62
|
|
|
@@ -331,6 +342,10 @@ message Reaction {
|
|
|
331
342
|
optional LegalHoldStatus legal_hold_status = 3 [default = UNKNOWN]; // whether this message was sent to legal hold
|
|
332
343
|
}
|
|
333
344
|
|
|
345
|
+
message InCallEmoji {
|
|
346
|
+
map<string, int32> emojis = 1;
|
|
347
|
+
}
|
|
348
|
+
|
|
334
349
|
message Calling {
|
|
335
350
|
required string content = 1;
|
|
336
351
|
optional QualifiedConversationId qualified_conversation_id = 2;
|
package/web/messages.d.ts
CHANGED
|
@@ -23,6 +23,8 @@ export interface IGenericMessage {
|
|
|
23
23
|
buttonAction?: (IButtonAction|null);
|
|
24
24
|
buttonActionConfirmation?: (IButtonActionConfirmation|null);
|
|
25
25
|
dataTransfer?: (IDataTransfer|null);
|
|
26
|
+
inCallEmoji?: (IInCallEmoji|null);
|
|
27
|
+
unknownStrategy?: (GenericMessage.UnknownStrategy|null);
|
|
26
28
|
}
|
|
27
29
|
|
|
28
30
|
export class GenericMessage implements IGenericMessage {
|
|
@@ -49,7 +51,9 @@ export class GenericMessage implements IGenericMessage {
|
|
|
49
51
|
public buttonAction?: (IButtonAction|null);
|
|
50
52
|
public buttonActionConfirmation?: (IButtonActionConfirmation|null);
|
|
51
53
|
public dataTransfer?: (IDataTransfer|null);
|
|
52
|
-
public
|
|
54
|
+
public inCallEmoji?: (IInCallEmoji|null);
|
|
55
|
+
public unknownStrategy: GenericMessage.UnknownStrategy;
|
|
56
|
+
public content?: ("text"|"image"|"knock"|"lastRead"|"cleared"|"external"|"clientAction"|"calling"|"asset"|"hidden"|"location"|"deleted"|"edited"|"confirmation"|"reaction"|"ephemeral"|"availability"|"composite"|"buttonAction"|"buttonActionConfirmation"|"dataTransfer"|"inCallEmoji");
|
|
53
57
|
public static create(properties?: IGenericMessage): GenericMessage;
|
|
54
58
|
public static encode(message: IGenericMessage, writer?: $protobuf.Writer): $protobuf.Writer;
|
|
55
59
|
public static encodeDelimited(message: IGenericMessage, writer?: $protobuf.Writer): $protobuf.Writer;
|
|
@@ -62,6 +66,15 @@ export class GenericMessage implements IGenericMessage {
|
|
|
62
66
|
public static getTypeUrl(typeUrlPrefix?: string): string;
|
|
63
67
|
}
|
|
64
68
|
|
|
69
|
+
export namespace GenericMessage {
|
|
70
|
+
|
|
71
|
+
enum UnknownStrategy {
|
|
72
|
+
IGNORE = 0,
|
|
73
|
+
DISCARD_AND_WARN = 1,
|
|
74
|
+
WARN_USER_ALLOW_RETRY = 2
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
65
78
|
export interface IQualifiedUserId {
|
|
66
79
|
id: string;
|
|
67
80
|
domain: string;
|
|
@@ -905,6 +918,25 @@ export class Reaction implements IReaction {
|
|
|
905
918
|
public static getTypeUrl(typeUrlPrefix?: string): string;
|
|
906
919
|
}
|
|
907
920
|
|
|
921
|
+
export interface IInCallEmoji {
|
|
922
|
+
emojis?: ({ [k: string]: number }|null);
|
|
923
|
+
}
|
|
924
|
+
|
|
925
|
+
export class InCallEmoji implements IInCallEmoji {
|
|
926
|
+
constructor(properties?: IInCallEmoji);
|
|
927
|
+
public emojis: { [k: string]: number };
|
|
928
|
+
public static create(properties?: IInCallEmoji): InCallEmoji;
|
|
929
|
+
public static encode(message: IInCallEmoji, writer?: $protobuf.Writer): $protobuf.Writer;
|
|
930
|
+
public static encodeDelimited(message: IInCallEmoji, writer?: $protobuf.Writer): $protobuf.Writer;
|
|
931
|
+
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): InCallEmoji;
|
|
932
|
+
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): InCallEmoji;
|
|
933
|
+
public static verify(message: { [k: string]: any }): (string|null);
|
|
934
|
+
public static fromObject(object: { [k: string]: any }): InCallEmoji;
|
|
935
|
+
public static toObject(message: InCallEmoji, options?: $protobuf.IConversionOptions): { [k: string]: any };
|
|
936
|
+
public toJSON(): { [k: string]: any };
|
|
937
|
+
public static getTypeUrl(typeUrlPrefix?: string): string;
|
|
938
|
+
}
|
|
939
|
+
|
|
908
940
|
export interface ICalling {
|
|
909
941
|
content: string;
|
|
910
942
|
qualifiedConversationId?: (IQualifiedConversationId|null);
|
package/web/messages.js
CHANGED
|
@@ -37,6 +37,8 @@ $root.GenericMessage = (function() {
|
|
|
37
37
|
* @property {IButtonAction|null} [buttonAction] GenericMessage buttonAction
|
|
38
38
|
* @property {IButtonActionConfirmation|null} [buttonActionConfirmation] GenericMessage buttonActionConfirmation
|
|
39
39
|
* @property {IDataTransfer|null} [dataTransfer] GenericMessage dataTransfer
|
|
40
|
+
* @property {IInCallEmoji|null} [inCallEmoji] GenericMessage inCallEmoji
|
|
41
|
+
* @property {GenericMessage.UnknownStrategy|null} [unknownStrategy] GenericMessage unknownStrategy
|
|
40
42
|
*/
|
|
41
43
|
|
|
42
44
|
/**
|
|
@@ -230,17 +232,33 @@ $root.GenericMessage = (function() {
|
|
|
230
232
|
*/
|
|
231
233
|
GenericMessage.prototype.dataTransfer = null;
|
|
232
234
|
|
|
235
|
+
/**
|
|
236
|
+
* GenericMessage inCallEmoji.
|
|
237
|
+
* @member {IInCallEmoji|null|undefined} inCallEmoji
|
|
238
|
+
* @memberof GenericMessage
|
|
239
|
+
* @instance
|
|
240
|
+
*/
|
|
241
|
+
GenericMessage.prototype.inCallEmoji = null;
|
|
242
|
+
|
|
243
|
+
/**
|
|
244
|
+
* GenericMessage unknownStrategy.
|
|
245
|
+
* @member {GenericMessage.UnknownStrategy} unknownStrategy
|
|
246
|
+
* @memberof GenericMessage
|
|
247
|
+
* @instance
|
|
248
|
+
*/
|
|
249
|
+
GenericMessage.prototype.unknownStrategy = 0;
|
|
250
|
+
|
|
233
251
|
// OneOf field names bound to virtual getters and setters
|
|
234
252
|
var $oneOfFields;
|
|
235
253
|
|
|
236
254
|
/**
|
|
237
255
|
* GenericMessage content.
|
|
238
|
-
* @member {"text"|"image"|"knock"|"lastRead"|"cleared"|"external"|"clientAction"|"calling"|"asset"|"hidden"|"location"|"deleted"|"edited"|"confirmation"|"reaction"|"ephemeral"|"availability"|"composite"|"buttonAction"|"buttonActionConfirmation"|"dataTransfer"|undefined} content
|
|
256
|
+
* @member {"text"|"image"|"knock"|"lastRead"|"cleared"|"external"|"clientAction"|"calling"|"asset"|"hidden"|"location"|"deleted"|"edited"|"confirmation"|"reaction"|"ephemeral"|"availability"|"composite"|"buttonAction"|"buttonActionConfirmation"|"dataTransfer"|"inCallEmoji"|undefined} content
|
|
239
257
|
* @memberof GenericMessage
|
|
240
258
|
* @instance
|
|
241
259
|
*/
|
|
242
260
|
Object.defineProperty(GenericMessage.prototype, "content", {
|
|
243
|
-
get: $util.oneOfGetter($oneOfFields = ["text", "image", "knock", "lastRead", "cleared", "external", "clientAction", "calling", "asset", "hidden", "location", "deleted", "edited", "confirmation", "reaction", "ephemeral", "availability", "composite", "buttonAction", "buttonActionConfirmation", "dataTransfer"]),
|
|
261
|
+
get: $util.oneOfGetter($oneOfFields = ["text", "image", "knock", "lastRead", "cleared", "external", "clientAction", "calling", "asset", "hidden", "location", "deleted", "edited", "confirmation", "reaction", "ephemeral", "availability", "composite", "buttonAction", "buttonActionConfirmation", "dataTransfer", "inCallEmoji"]),
|
|
244
262
|
set: $util.oneOfSetter($oneOfFields)
|
|
245
263
|
});
|
|
246
264
|
|
|
@@ -311,6 +329,10 @@ $root.GenericMessage = (function() {
|
|
|
311
329
|
$root.ButtonActionConfirmation.encode(message.buttonActionConfirmation, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim();
|
|
312
330
|
if (message.dataTransfer != null && Object.hasOwnProperty.call(message, "dataTransfer"))
|
|
313
331
|
$root.DataTransfer.encode(message.dataTransfer, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim();
|
|
332
|
+
if (message.inCallEmoji != null && Object.hasOwnProperty.call(message, "inCallEmoji"))
|
|
333
|
+
$root.InCallEmoji.encode(message.inCallEmoji, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim();
|
|
334
|
+
if (message.unknownStrategy != null && Object.hasOwnProperty.call(message, "unknownStrategy"))
|
|
335
|
+
writer.uint32(/* id 25, wireType 0 =*/200).int32(message.unknownStrategy);
|
|
314
336
|
return writer;
|
|
315
337
|
};
|
|
316
338
|
|
|
@@ -433,6 +455,14 @@ $root.GenericMessage = (function() {
|
|
|
433
455
|
message.dataTransfer = $root.DataTransfer.decode(reader, reader.uint32());
|
|
434
456
|
break;
|
|
435
457
|
}
|
|
458
|
+
case 24: {
|
|
459
|
+
message.inCallEmoji = $root.InCallEmoji.decode(reader, reader.uint32());
|
|
460
|
+
break;
|
|
461
|
+
}
|
|
462
|
+
case 25: {
|
|
463
|
+
message.unknownStrategy = reader.int32();
|
|
464
|
+
break;
|
|
465
|
+
}
|
|
436
466
|
default:
|
|
437
467
|
reader.skipType(tag & 7);
|
|
438
468
|
break;
|
|
@@ -682,6 +712,25 @@ $root.GenericMessage = (function() {
|
|
|
682
712
|
return "dataTransfer." + error;
|
|
683
713
|
}
|
|
684
714
|
}
|
|
715
|
+
if (message.inCallEmoji != null && message.hasOwnProperty("inCallEmoji")) {
|
|
716
|
+
if (properties.content === 1)
|
|
717
|
+
return "content: multiple values";
|
|
718
|
+
properties.content = 1;
|
|
719
|
+
{
|
|
720
|
+
var error = $root.InCallEmoji.verify(message.inCallEmoji);
|
|
721
|
+
if (error)
|
|
722
|
+
return "inCallEmoji." + error;
|
|
723
|
+
}
|
|
724
|
+
}
|
|
725
|
+
if (message.unknownStrategy != null && message.hasOwnProperty("unknownStrategy"))
|
|
726
|
+
switch (message.unknownStrategy) {
|
|
727
|
+
default:
|
|
728
|
+
return "unknownStrategy: enum value expected";
|
|
729
|
+
case 0:
|
|
730
|
+
case 1:
|
|
731
|
+
case 2:
|
|
732
|
+
break;
|
|
733
|
+
}
|
|
685
734
|
return null;
|
|
686
735
|
};
|
|
687
736
|
|
|
@@ -811,6 +860,31 @@ $root.GenericMessage = (function() {
|
|
|
811
860
|
throw TypeError(".GenericMessage.dataTransfer: object expected");
|
|
812
861
|
message.dataTransfer = $root.DataTransfer.fromObject(object.dataTransfer);
|
|
813
862
|
}
|
|
863
|
+
if (object.inCallEmoji != null) {
|
|
864
|
+
if (typeof object.inCallEmoji !== "object")
|
|
865
|
+
throw TypeError(".GenericMessage.inCallEmoji: object expected");
|
|
866
|
+
message.inCallEmoji = $root.InCallEmoji.fromObject(object.inCallEmoji);
|
|
867
|
+
}
|
|
868
|
+
switch (object.unknownStrategy) {
|
|
869
|
+
default:
|
|
870
|
+
if (typeof object.unknownStrategy === "number") {
|
|
871
|
+
message.unknownStrategy = object.unknownStrategy;
|
|
872
|
+
break;
|
|
873
|
+
}
|
|
874
|
+
break;
|
|
875
|
+
case "IGNORE":
|
|
876
|
+
case 0:
|
|
877
|
+
message.unknownStrategy = 0;
|
|
878
|
+
break;
|
|
879
|
+
case "DISCARD_AND_WARN":
|
|
880
|
+
case 1:
|
|
881
|
+
message.unknownStrategy = 1;
|
|
882
|
+
break;
|
|
883
|
+
case "WARN_USER_ALLOW_RETRY":
|
|
884
|
+
case 2:
|
|
885
|
+
message.unknownStrategy = 2;
|
|
886
|
+
break;
|
|
887
|
+
}
|
|
814
888
|
return message;
|
|
815
889
|
};
|
|
816
890
|
|
|
@@ -827,8 +901,10 @@ $root.GenericMessage = (function() {
|
|
|
827
901
|
if (!options)
|
|
828
902
|
options = {};
|
|
829
903
|
var object = {};
|
|
830
|
-
if (options.defaults)
|
|
904
|
+
if (options.defaults) {
|
|
831
905
|
object.messageId = "";
|
|
906
|
+
object.unknownStrategy = options.enums === String ? "IGNORE" : 0;
|
|
907
|
+
}
|
|
832
908
|
if (message.messageId != null && message.hasOwnProperty("messageId"))
|
|
833
909
|
object.messageId = message.messageId;
|
|
834
910
|
if (message.text != null && message.hasOwnProperty("text")) {
|
|
@@ -936,6 +1012,13 @@ $root.GenericMessage = (function() {
|
|
|
936
1012
|
if (options.oneofs)
|
|
937
1013
|
object.content = "dataTransfer";
|
|
938
1014
|
}
|
|
1015
|
+
if (message.inCallEmoji != null && message.hasOwnProperty("inCallEmoji")) {
|
|
1016
|
+
object.inCallEmoji = $root.InCallEmoji.toObject(message.inCallEmoji, options);
|
|
1017
|
+
if (options.oneofs)
|
|
1018
|
+
object.content = "inCallEmoji";
|
|
1019
|
+
}
|
|
1020
|
+
if (message.unknownStrategy != null && message.hasOwnProperty("unknownStrategy"))
|
|
1021
|
+
object.unknownStrategy = options.enums === String ? $root.GenericMessage.UnknownStrategy[message.unknownStrategy] === undefined ? message.unknownStrategy : $root.GenericMessage.UnknownStrategy[message.unknownStrategy] : message.unknownStrategy;
|
|
939
1022
|
return object;
|
|
940
1023
|
};
|
|
941
1024
|
|
|
@@ -965,6 +1048,22 @@ $root.GenericMessage = (function() {
|
|
|
965
1048
|
return typeUrlPrefix + "/GenericMessage";
|
|
966
1049
|
};
|
|
967
1050
|
|
|
1051
|
+
/**
|
|
1052
|
+
* UnknownStrategy enum.
|
|
1053
|
+
* @name GenericMessage.UnknownStrategy
|
|
1054
|
+
* @enum {number}
|
|
1055
|
+
* @property {number} IGNORE=0 IGNORE value
|
|
1056
|
+
* @property {number} DISCARD_AND_WARN=1 DISCARD_AND_WARN value
|
|
1057
|
+
* @property {number} WARN_USER_ALLOW_RETRY=2 WARN_USER_ALLOW_RETRY value
|
|
1058
|
+
*/
|
|
1059
|
+
GenericMessage.UnknownStrategy = (function() {
|
|
1060
|
+
var valuesById = {}, values = Object.create(valuesById);
|
|
1061
|
+
values[valuesById[0] = "IGNORE"] = 0;
|
|
1062
|
+
values[valuesById[1] = "DISCARD_AND_WARN"] = 1;
|
|
1063
|
+
values[valuesById[2] = "WARN_USER_ALLOW_RETRY"] = 2;
|
|
1064
|
+
return values;
|
|
1065
|
+
})();
|
|
1066
|
+
|
|
968
1067
|
return GenericMessage;
|
|
969
1068
|
})();
|
|
970
1069
|
|
|
@@ -10674,6 +10773,244 @@ $root.Reaction = (function() {
|
|
|
10674
10773
|
return Reaction;
|
|
10675
10774
|
})();
|
|
10676
10775
|
|
|
10776
|
+
$root.InCallEmoji = (function() {
|
|
10777
|
+
|
|
10778
|
+
/**
|
|
10779
|
+
* Properties of an InCallEmoji.
|
|
10780
|
+
* @exports IInCallEmoji
|
|
10781
|
+
* @interface IInCallEmoji
|
|
10782
|
+
* @property {Object.<string,number>|null} [emojis] InCallEmoji emojis
|
|
10783
|
+
*/
|
|
10784
|
+
|
|
10785
|
+
/**
|
|
10786
|
+
* Constructs a new InCallEmoji.
|
|
10787
|
+
* @exports InCallEmoji
|
|
10788
|
+
* @classdesc Represents an InCallEmoji.
|
|
10789
|
+
* @implements IInCallEmoji
|
|
10790
|
+
* @constructor
|
|
10791
|
+
* @param {IInCallEmoji=} [properties] Properties to set
|
|
10792
|
+
*/
|
|
10793
|
+
function InCallEmoji(properties) {
|
|
10794
|
+
this.emojis = {};
|
|
10795
|
+
if (properties)
|
|
10796
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
10797
|
+
if (properties[keys[i]] != null)
|
|
10798
|
+
this[keys[i]] = properties[keys[i]];
|
|
10799
|
+
}
|
|
10800
|
+
|
|
10801
|
+
/**
|
|
10802
|
+
* InCallEmoji emojis.
|
|
10803
|
+
* @member {Object.<string,number>} emojis
|
|
10804
|
+
* @memberof InCallEmoji
|
|
10805
|
+
* @instance
|
|
10806
|
+
*/
|
|
10807
|
+
InCallEmoji.prototype.emojis = $util.emptyObject;
|
|
10808
|
+
|
|
10809
|
+
/**
|
|
10810
|
+
* Creates a new InCallEmoji instance using the specified properties.
|
|
10811
|
+
* @function create
|
|
10812
|
+
* @memberof InCallEmoji
|
|
10813
|
+
* @static
|
|
10814
|
+
* @param {IInCallEmoji=} [properties] Properties to set
|
|
10815
|
+
* @returns {InCallEmoji} InCallEmoji instance
|
|
10816
|
+
*/
|
|
10817
|
+
InCallEmoji.create = function create(properties) {
|
|
10818
|
+
return new InCallEmoji(properties);
|
|
10819
|
+
};
|
|
10820
|
+
|
|
10821
|
+
/**
|
|
10822
|
+
* Encodes the specified InCallEmoji message. Does not implicitly {@link InCallEmoji.verify|verify} messages.
|
|
10823
|
+
* @function encode
|
|
10824
|
+
* @memberof InCallEmoji
|
|
10825
|
+
* @static
|
|
10826
|
+
* @param {IInCallEmoji} message InCallEmoji message or plain object to encode
|
|
10827
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
10828
|
+
* @returns {$protobuf.Writer} Writer
|
|
10829
|
+
*/
|
|
10830
|
+
InCallEmoji.encode = function encode(message, writer) {
|
|
10831
|
+
if (!writer)
|
|
10832
|
+
writer = $Writer.create();
|
|
10833
|
+
if (message.emojis != null && Object.hasOwnProperty.call(message, "emojis"))
|
|
10834
|
+
for (var keys = Object.keys(message.emojis), i = 0; i < keys.length; ++i)
|
|
10835
|
+
writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 0 =*/16).int32(message.emojis[keys[i]]).ldelim();
|
|
10836
|
+
return writer;
|
|
10837
|
+
};
|
|
10838
|
+
|
|
10839
|
+
/**
|
|
10840
|
+
* Encodes the specified InCallEmoji message, length delimited. Does not implicitly {@link InCallEmoji.verify|verify} messages.
|
|
10841
|
+
* @function encodeDelimited
|
|
10842
|
+
* @memberof InCallEmoji
|
|
10843
|
+
* @static
|
|
10844
|
+
* @param {IInCallEmoji} message InCallEmoji message or plain object to encode
|
|
10845
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
10846
|
+
* @returns {$protobuf.Writer} Writer
|
|
10847
|
+
*/
|
|
10848
|
+
InCallEmoji.encodeDelimited = function encodeDelimited(message, writer) {
|
|
10849
|
+
return this.encode(message, writer).ldelim();
|
|
10850
|
+
};
|
|
10851
|
+
|
|
10852
|
+
/**
|
|
10853
|
+
* Decodes an InCallEmoji message from the specified reader or buffer.
|
|
10854
|
+
* @function decode
|
|
10855
|
+
* @memberof InCallEmoji
|
|
10856
|
+
* @static
|
|
10857
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
10858
|
+
* @param {number} [length] Message length if known beforehand
|
|
10859
|
+
* @returns {InCallEmoji} InCallEmoji
|
|
10860
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
10861
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
10862
|
+
*/
|
|
10863
|
+
InCallEmoji.decode = function decode(reader, length) {
|
|
10864
|
+
if (!(reader instanceof $Reader))
|
|
10865
|
+
reader = $Reader.create(reader);
|
|
10866
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.InCallEmoji(), key, value;
|
|
10867
|
+
while (reader.pos < end) {
|
|
10868
|
+
var tag = reader.uint32();
|
|
10869
|
+
switch (tag >>> 3) {
|
|
10870
|
+
case 1: {
|
|
10871
|
+
if (message.emojis === $util.emptyObject)
|
|
10872
|
+
message.emojis = {};
|
|
10873
|
+
var end2 = reader.uint32() + reader.pos;
|
|
10874
|
+
key = "";
|
|
10875
|
+
value = 0;
|
|
10876
|
+
while (reader.pos < end2) {
|
|
10877
|
+
var tag2 = reader.uint32();
|
|
10878
|
+
switch (tag2 >>> 3) {
|
|
10879
|
+
case 1:
|
|
10880
|
+
key = reader.string();
|
|
10881
|
+
break;
|
|
10882
|
+
case 2:
|
|
10883
|
+
value = reader.int32();
|
|
10884
|
+
break;
|
|
10885
|
+
default:
|
|
10886
|
+
reader.skipType(tag2 & 7);
|
|
10887
|
+
break;
|
|
10888
|
+
}
|
|
10889
|
+
}
|
|
10890
|
+
message.emojis[key] = value;
|
|
10891
|
+
break;
|
|
10892
|
+
}
|
|
10893
|
+
default:
|
|
10894
|
+
reader.skipType(tag & 7);
|
|
10895
|
+
break;
|
|
10896
|
+
}
|
|
10897
|
+
}
|
|
10898
|
+
return message;
|
|
10899
|
+
};
|
|
10900
|
+
|
|
10901
|
+
/**
|
|
10902
|
+
* Decodes an InCallEmoji message from the specified reader or buffer, length delimited.
|
|
10903
|
+
* @function decodeDelimited
|
|
10904
|
+
* @memberof InCallEmoji
|
|
10905
|
+
* @static
|
|
10906
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
10907
|
+
* @returns {InCallEmoji} InCallEmoji
|
|
10908
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
10909
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
10910
|
+
*/
|
|
10911
|
+
InCallEmoji.decodeDelimited = function decodeDelimited(reader) {
|
|
10912
|
+
if (!(reader instanceof $Reader))
|
|
10913
|
+
reader = new $Reader(reader);
|
|
10914
|
+
return this.decode(reader, reader.uint32());
|
|
10915
|
+
};
|
|
10916
|
+
|
|
10917
|
+
/**
|
|
10918
|
+
* Verifies an InCallEmoji message.
|
|
10919
|
+
* @function verify
|
|
10920
|
+
* @memberof InCallEmoji
|
|
10921
|
+
* @static
|
|
10922
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
10923
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
10924
|
+
*/
|
|
10925
|
+
InCallEmoji.verify = function verify(message) {
|
|
10926
|
+
if (typeof message !== "object" || message === null)
|
|
10927
|
+
return "object expected";
|
|
10928
|
+
if (message.emojis != null && message.hasOwnProperty("emojis")) {
|
|
10929
|
+
if (!$util.isObject(message.emojis))
|
|
10930
|
+
return "emojis: object expected";
|
|
10931
|
+
var key = Object.keys(message.emojis);
|
|
10932
|
+
for (var i = 0; i < key.length; ++i)
|
|
10933
|
+
if (!$util.isInteger(message.emojis[key[i]]))
|
|
10934
|
+
return "emojis: integer{k:string} expected";
|
|
10935
|
+
}
|
|
10936
|
+
return null;
|
|
10937
|
+
};
|
|
10938
|
+
|
|
10939
|
+
/**
|
|
10940
|
+
* Creates an InCallEmoji message from a plain object. Also converts values to their respective internal types.
|
|
10941
|
+
* @function fromObject
|
|
10942
|
+
* @memberof InCallEmoji
|
|
10943
|
+
* @static
|
|
10944
|
+
* @param {Object.<string,*>} object Plain object
|
|
10945
|
+
* @returns {InCallEmoji} InCallEmoji
|
|
10946
|
+
*/
|
|
10947
|
+
InCallEmoji.fromObject = function fromObject(object) {
|
|
10948
|
+
if (object instanceof $root.InCallEmoji)
|
|
10949
|
+
return object;
|
|
10950
|
+
var message = new $root.InCallEmoji();
|
|
10951
|
+
if (object.emojis) {
|
|
10952
|
+
if (typeof object.emojis !== "object")
|
|
10953
|
+
throw TypeError(".InCallEmoji.emojis: object expected");
|
|
10954
|
+
message.emojis = {};
|
|
10955
|
+
for (var keys = Object.keys(object.emojis), i = 0; i < keys.length; ++i)
|
|
10956
|
+
message.emojis[keys[i]] = object.emojis[keys[i]] | 0;
|
|
10957
|
+
}
|
|
10958
|
+
return message;
|
|
10959
|
+
};
|
|
10960
|
+
|
|
10961
|
+
/**
|
|
10962
|
+
* Creates a plain object from an InCallEmoji message. Also converts values to other types if specified.
|
|
10963
|
+
* @function toObject
|
|
10964
|
+
* @memberof InCallEmoji
|
|
10965
|
+
* @static
|
|
10966
|
+
* @param {InCallEmoji} message InCallEmoji
|
|
10967
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
10968
|
+
* @returns {Object.<string,*>} Plain object
|
|
10969
|
+
*/
|
|
10970
|
+
InCallEmoji.toObject = function toObject(message, options) {
|
|
10971
|
+
if (!options)
|
|
10972
|
+
options = {};
|
|
10973
|
+
var object = {};
|
|
10974
|
+
if (options.objects || options.defaults)
|
|
10975
|
+
object.emojis = {};
|
|
10976
|
+
var keys2;
|
|
10977
|
+
if (message.emojis && (keys2 = Object.keys(message.emojis)).length) {
|
|
10978
|
+
object.emojis = {};
|
|
10979
|
+
for (var j = 0; j < keys2.length; ++j)
|
|
10980
|
+
object.emojis[keys2[j]] = message.emojis[keys2[j]];
|
|
10981
|
+
}
|
|
10982
|
+
return object;
|
|
10983
|
+
};
|
|
10984
|
+
|
|
10985
|
+
/**
|
|
10986
|
+
* Converts this InCallEmoji to JSON.
|
|
10987
|
+
* @function toJSON
|
|
10988
|
+
* @memberof InCallEmoji
|
|
10989
|
+
* @instance
|
|
10990
|
+
* @returns {Object.<string,*>} JSON object
|
|
10991
|
+
*/
|
|
10992
|
+
InCallEmoji.prototype.toJSON = function toJSON() {
|
|
10993
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
10994
|
+
};
|
|
10995
|
+
|
|
10996
|
+
/**
|
|
10997
|
+
* Gets the default type url for InCallEmoji
|
|
10998
|
+
* @function getTypeUrl
|
|
10999
|
+
* @memberof InCallEmoji
|
|
11000
|
+
* @static
|
|
11001
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
11002
|
+
* @returns {string} The default type url
|
|
11003
|
+
*/
|
|
11004
|
+
InCallEmoji.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
11005
|
+
if (typeUrlPrefix === undefined) {
|
|
11006
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
11007
|
+
}
|
|
11008
|
+
return typeUrlPrefix + "/InCallEmoji";
|
|
11009
|
+
};
|
|
11010
|
+
|
|
11011
|
+
return InCallEmoji;
|
|
11012
|
+
})();
|
|
11013
|
+
|
|
10677
11014
|
$root.Calling = (function() {
|
|
10678
11015
|
|
|
10679
11016
|
/**
|