mezon-js-protobuf 1.8.81 → 1.8.83
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/api/api.ts +41 -10
- package/dist/mezon-js-protobuf/api/api.d.ts +14 -9
- package/dist/mezon-js-protobuf/utils.d.ts +1 -2
- package/dist/mezon-js-protobuf.cjs.js +339 -8
- package/dist/mezon-js-protobuf.esm.mjs +339 -8
- package/package.json +1 -1
- package/utils.ts +1 -9
package/api/api.ts
CHANGED
|
@@ -3747,9 +3747,10 @@ export interface DirectFcmProto {
|
|
|
3747
3747
|
username: string;
|
|
3748
3748
|
mention_ids: string[];
|
|
3749
3749
|
position_s: number[];
|
|
3750
|
-
|
|
3750
|
+
position_e: number[];
|
|
3751
3751
|
attachment_type: string;
|
|
3752
3752
|
has_more_attachment: boolean;
|
|
3753
|
+
is_mention_role: boolean[];
|
|
3753
3754
|
}
|
|
3754
3755
|
|
|
3755
3756
|
export interface MessageMentionList {
|
|
@@ -39056,9 +39057,10 @@ function createBaseDirectFcmProto(): DirectFcmProto {
|
|
|
39056
39057
|
username: "",
|
|
39057
39058
|
mention_ids: [],
|
|
39058
39059
|
position_s: [],
|
|
39059
|
-
|
|
39060
|
+
position_e: [],
|
|
39060
39061
|
attachment_type: "",
|
|
39061
39062
|
has_more_attachment: false,
|
|
39063
|
+
is_mention_role: [],
|
|
39062
39064
|
};
|
|
39063
39065
|
}
|
|
39064
39066
|
|
|
@@ -39109,7 +39111,7 @@ export const DirectFcmProto = {
|
|
|
39109
39111
|
}
|
|
39110
39112
|
writer.ldelim();
|
|
39111
39113
|
writer.uint32(122).fork();
|
|
39112
|
-
for (const v of message.
|
|
39114
|
+
for (const v of message.position_e) {
|
|
39113
39115
|
writer.int32(v);
|
|
39114
39116
|
}
|
|
39115
39117
|
writer.ldelim();
|
|
@@ -39119,6 +39121,11 @@ export const DirectFcmProto = {
|
|
|
39119
39121
|
if (message.has_more_attachment !== false) {
|
|
39120
39122
|
writer.uint32(136).bool(message.has_more_attachment);
|
|
39121
39123
|
}
|
|
39124
|
+
writer.uint32(146).fork();
|
|
39125
|
+
for (const v of message.is_mention_role) {
|
|
39126
|
+
writer.bool(v);
|
|
39127
|
+
}
|
|
39128
|
+
writer.ldelim();
|
|
39122
39129
|
return writer;
|
|
39123
39130
|
},
|
|
39124
39131
|
|
|
@@ -39239,7 +39246,7 @@ export const DirectFcmProto = {
|
|
|
39239
39246
|
break;
|
|
39240
39247
|
case 15:
|
|
39241
39248
|
if (tag === 120) {
|
|
39242
|
-
message.
|
|
39249
|
+
message.position_e.push(reader.int32());
|
|
39243
39250
|
|
|
39244
39251
|
continue;
|
|
39245
39252
|
}
|
|
@@ -39247,7 +39254,7 @@ export const DirectFcmProto = {
|
|
|
39247
39254
|
if (tag === 122) {
|
|
39248
39255
|
const end2 = reader.uint32() + reader.pos;
|
|
39249
39256
|
while (reader.pos < end2) {
|
|
39250
|
-
message.
|
|
39257
|
+
message.position_e.push(reader.int32());
|
|
39251
39258
|
}
|
|
39252
39259
|
|
|
39253
39260
|
continue;
|
|
@@ -39268,6 +39275,23 @@ export const DirectFcmProto = {
|
|
|
39268
39275
|
|
|
39269
39276
|
message.has_more_attachment = reader.bool();
|
|
39270
39277
|
continue;
|
|
39278
|
+
case 18:
|
|
39279
|
+
if (tag === 144) {
|
|
39280
|
+
message.is_mention_role.push(reader.bool());
|
|
39281
|
+
|
|
39282
|
+
continue;
|
|
39283
|
+
}
|
|
39284
|
+
|
|
39285
|
+
if (tag === 146) {
|
|
39286
|
+
const end2 = reader.uint32() + reader.pos;
|
|
39287
|
+
while (reader.pos < end2) {
|
|
39288
|
+
message.is_mention_role.push(reader.bool());
|
|
39289
|
+
}
|
|
39290
|
+
|
|
39291
|
+
continue;
|
|
39292
|
+
}
|
|
39293
|
+
|
|
39294
|
+
break;
|
|
39271
39295
|
}
|
|
39272
39296
|
if ((tag & 7) === 4 || tag === 0) {
|
|
39273
39297
|
break;
|
|
@@ -39297,11 +39321,14 @@ export const DirectFcmProto = {
|
|
|
39297
39321
|
position_s: globalThis.Array.isArray(object?.position_s)
|
|
39298
39322
|
? object.position_s.map((e: any) => globalThis.Number(e))
|
|
39299
39323
|
: [],
|
|
39300
|
-
|
|
39301
|
-
? object.
|
|
39324
|
+
position_e: globalThis.Array.isArray(object?.position_e)
|
|
39325
|
+
? object.position_e.map((e: any) => globalThis.Number(e))
|
|
39302
39326
|
: [],
|
|
39303
39327
|
attachment_type: isSet(object.attachment_type) ? globalThis.String(object.attachment_type) : "",
|
|
39304
39328
|
has_more_attachment: isSet(object.has_more_attachment) ? globalThis.Boolean(object.has_more_attachment) : false,
|
|
39329
|
+
is_mention_role: globalThis.Array.isArray(object?.is_mention_role)
|
|
39330
|
+
? object.is_mention_role.map((e: any) => globalThis.Boolean(e))
|
|
39331
|
+
: [],
|
|
39305
39332
|
};
|
|
39306
39333
|
},
|
|
39307
39334
|
|
|
@@ -39349,8 +39376,8 @@ export const DirectFcmProto = {
|
|
|
39349
39376
|
if (message.position_s?.length) {
|
|
39350
39377
|
obj.position_s = message.position_s.map((e) => Math.round(e));
|
|
39351
39378
|
}
|
|
39352
|
-
if (message.
|
|
39353
|
-
obj.
|
|
39379
|
+
if (message.position_e?.length) {
|
|
39380
|
+
obj.position_e = message.position_e.map((e) => Math.round(e));
|
|
39354
39381
|
}
|
|
39355
39382
|
if (message.attachment_type !== "") {
|
|
39356
39383
|
obj.attachment_type = message.attachment_type;
|
|
@@ -39358,6 +39385,9 @@ export const DirectFcmProto = {
|
|
|
39358
39385
|
if (message.has_more_attachment !== false) {
|
|
39359
39386
|
obj.has_more_attachment = message.has_more_attachment;
|
|
39360
39387
|
}
|
|
39388
|
+
if (message.is_mention_role?.length) {
|
|
39389
|
+
obj.is_mention_role = message.is_mention_role;
|
|
39390
|
+
}
|
|
39361
39391
|
return obj;
|
|
39362
39392
|
},
|
|
39363
39393
|
|
|
@@ -39380,9 +39410,10 @@ export const DirectFcmProto = {
|
|
|
39380
39410
|
message.username = object.username ?? "";
|
|
39381
39411
|
message.mention_ids = object.mention_ids?.map((e) => e) || [];
|
|
39382
39412
|
message.position_s = object.position_s?.map((e) => e) || [];
|
|
39383
|
-
message.
|
|
39413
|
+
message.position_e = object.position_e?.map((e) => e) || [];
|
|
39384
39414
|
message.attachment_type = object.attachment_type ?? "";
|
|
39385
39415
|
message.has_more_attachment = object.has_more_attachment ?? false;
|
|
39416
|
+
message.is_mention_role = object.is_mention_role?.map((e) => e) || [];
|
|
39386
39417
|
return message;
|
|
39387
39418
|
},
|
|
39388
39419
|
};
|
|
@@ -3133,9 +3133,10 @@ export interface DirectFcmProto {
|
|
|
3133
3133
|
username: string;
|
|
3134
3134
|
mention_ids: string[];
|
|
3135
3135
|
position_s: number[];
|
|
3136
|
-
|
|
3136
|
+
position_e: number[];
|
|
3137
3137
|
attachment_type: string;
|
|
3138
3138
|
has_more_attachment: boolean;
|
|
3139
|
+
is_mention_role: boolean[];
|
|
3139
3140
|
}
|
|
3140
3141
|
export interface MessageMentionList {
|
|
3141
3142
|
mentions: MessageMention[];
|
|
@@ -23259,9 +23260,10 @@ export declare const DirectFcmProto: {
|
|
|
23259
23260
|
username?: string | undefined;
|
|
23260
23261
|
mention_ids?: string[] | undefined;
|
|
23261
23262
|
position_s?: number[] | undefined;
|
|
23262
|
-
|
|
23263
|
+
position_e?: number[] | undefined;
|
|
23263
23264
|
attachment_type?: string | undefined;
|
|
23264
23265
|
has_more_attachment?: boolean | undefined;
|
|
23266
|
+
is_mention_role?: boolean[] | undefined;
|
|
23265
23267
|
} & {
|
|
23266
23268
|
title?: string | undefined;
|
|
23267
23269
|
link?: string | undefined;
|
|
@@ -23277,10 +23279,11 @@ export declare const DirectFcmProto: {
|
|
|
23277
23279
|
username?: string | undefined;
|
|
23278
23280
|
mention_ids?: (string[] & string[] & { [K in Exclude<keyof I["mention_ids"], keyof string[]>]: never; }) | undefined;
|
|
23279
23281
|
position_s?: (number[] & number[] & { [K_1 in Exclude<keyof I["position_s"], keyof number[]>]: never; }) | undefined;
|
|
23280
|
-
|
|
23282
|
+
position_e?: (number[] & number[] & { [K_2 in Exclude<keyof I["position_e"], keyof number[]>]: never; }) | undefined;
|
|
23281
23283
|
attachment_type?: string | undefined;
|
|
23282
23284
|
has_more_attachment?: boolean | undefined;
|
|
23283
|
-
|
|
23285
|
+
is_mention_role?: (boolean[] & boolean[] & { [K_3 in Exclude<keyof I["is_mention_role"], keyof boolean[]>]: never; }) | undefined;
|
|
23286
|
+
} & { [K_4 in Exclude<keyof I, keyof DirectFcmProto>]: never; }>(base?: I | undefined): DirectFcmProto;
|
|
23284
23287
|
fromPartial<I_1 extends {
|
|
23285
23288
|
title?: string | undefined;
|
|
23286
23289
|
link?: string | undefined;
|
|
@@ -23296,9 +23299,10 @@ export declare const DirectFcmProto: {
|
|
|
23296
23299
|
username?: string | undefined;
|
|
23297
23300
|
mention_ids?: string[] | undefined;
|
|
23298
23301
|
position_s?: number[] | undefined;
|
|
23299
|
-
|
|
23302
|
+
position_e?: number[] | undefined;
|
|
23300
23303
|
attachment_type?: string | undefined;
|
|
23301
23304
|
has_more_attachment?: boolean | undefined;
|
|
23305
|
+
is_mention_role?: boolean[] | undefined;
|
|
23302
23306
|
} & {
|
|
23303
23307
|
title?: string | undefined;
|
|
23304
23308
|
link?: string | undefined;
|
|
@@ -23312,12 +23316,13 @@ export declare const DirectFcmProto: {
|
|
|
23312
23316
|
create_time_seconds?: number | undefined;
|
|
23313
23317
|
update_time_seconds?: number | undefined;
|
|
23314
23318
|
username?: string | undefined;
|
|
23315
|
-
mention_ids?: (string[] & string[] & { [
|
|
23316
|
-
position_s?: (number[] & number[] & { [
|
|
23317
|
-
|
|
23319
|
+
mention_ids?: (string[] & string[] & { [K_5 in Exclude<keyof I_1["mention_ids"], keyof string[]>]: never; }) | undefined;
|
|
23320
|
+
position_s?: (number[] & number[] & { [K_6 in Exclude<keyof I_1["position_s"], keyof number[]>]: never; }) | undefined;
|
|
23321
|
+
position_e?: (number[] & number[] & { [K_7 in Exclude<keyof I_1["position_e"], keyof number[]>]: never; }) | undefined;
|
|
23318
23322
|
attachment_type?: string | undefined;
|
|
23319
23323
|
has_more_attachment?: boolean | undefined;
|
|
23320
|
-
|
|
23324
|
+
is_mention_role?: (boolean[] & boolean[] & { [K_8 in Exclude<keyof I_1["is_mention_role"], keyof boolean[]>]: never; }) | undefined;
|
|
23325
|
+
} & { [K_9 in Exclude<keyof I_1, keyof DirectFcmProto>]: never; }>(object: I_1): DirectFcmProto;
|
|
23321
23326
|
};
|
|
23322
23327
|
export declare const MessageMentionList: {
|
|
23323
23328
|
encode(message: MessageMentionList, writer?: _m0.Writer): _m0.Writer;
|
|
@@ -3,5 +3,4 @@ export declare function decodeMentions(data: any): tsproto.MessageMentionList;
|
|
|
3
3
|
export declare function decodeAttachments(data: any): tsproto.MessageAttachmentList;
|
|
4
4
|
export declare function decodeRefs(data: any): tsproto.MessageRefList;
|
|
5
5
|
export declare function decodeReactions(data: any): tsproto.MessageReactionList;
|
|
6
|
-
export declare function decodeNotificationFcm(data: any): tsproto.
|
|
7
|
-
export declare function decodeNotificationContent(data: any): string;
|
|
6
|
+
export declare function decodeNotificationFcm(data: any): tsproto.DirectFcmProto;
|
|
@@ -2267,7 +2267,6 @@ __export(mezon_js_protobuf_exports, {
|
|
|
2267
2267
|
WebSocketAdapterPb: () => WebSocketAdapterPb,
|
|
2268
2268
|
decodeAttachments: () => decodeAttachments,
|
|
2269
2269
|
decodeMentions: () => decodeMentions,
|
|
2270
|
-
decodeNotificationContent: () => decodeNotificationContent,
|
|
2271
2270
|
decodeNotificationFcm: () => decodeNotificationFcm,
|
|
2272
2271
|
decodeReactions: () => decodeReactions,
|
|
2273
2272
|
decodeRefs: () => decodeRefs
|
|
@@ -14162,6 +14161,344 @@ var SearchThreadRequest = {
|
|
|
14162
14161
|
return message;
|
|
14163
14162
|
}
|
|
14164
14163
|
};
|
|
14164
|
+
function createBaseDirectFcmProto() {
|
|
14165
|
+
return {
|
|
14166
|
+
title: "",
|
|
14167
|
+
link: "",
|
|
14168
|
+
content: "",
|
|
14169
|
+
channel_id: "",
|
|
14170
|
+
sender_id: "",
|
|
14171
|
+
avatar: "",
|
|
14172
|
+
clan_id: "",
|
|
14173
|
+
attachment_link: "",
|
|
14174
|
+
display_name: "",
|
|
14175
|
+
create_time_seconds: 0,
|
|
14176
|
+
update_time_seconds: 0,
|
|
14177
|
+
username: "",
|
|
14178
|
+
mention_ids: [],
|
|
14179
|
+
position_s: [],
|
|
14180
|
+
position_e: [],
|
|
14181
|
+
attachment_type: "",
|
|
14182
|
+
has_more_attachment: false,
|
|
14183
|
+
is_mention_role: []
|
|
14184
|
+
};
|
|
14185
|
+
}
|
|
14186
|
+
var DirectFcmProto = {
|
|
14187
|
+
encode(message, writer = import_minimal3.default.Writer.create()) {
|
|
14188
|
+
if (message.title !== "") {
|
|
14189
|
+
writer.uint32(10).string(message.title);
|
|
14190
|
+
}
|
|
14191
|
+
if (message.link !== "") {
|
|
14192
|
+
writer.uint32(18).string(message.link);
|
|
14193
|
+
}
|
|
14194
|
+
if (message.content !== "") {
|
|
14195
|
+
writer.uint32(26).string(message.content);
|
|
14196
|
+
}
|
|
14197
|
+
if (message.channel_id !== "") {
|
|
14198
|
+
writer.uint32(34).string(message.channel_id);
|
|
14199
|
+
}
|
|
14200
|
+
if (message.sender_id !== "") {
|
|
14201
|
+
writer.uint32(42).string(message.sender_id);
|
|
14202
|
+
}
|
|
14203
|
+
if (message.avatar !== "") {
|
|
14204
|
+
writer.uint32(50).string(message.avatar);
|
|
14205
|
+
}
|
|
14206
|
+
if (message.clan_id !== "") {
|
|
14207
|
+
writer.uint32(58).string(message.clan_id);
|
|
14208
|
+
}
|
|
14209
|
+
if (message.attachment_link !== "") {
|
|
14210
|
+
writer.uint32(66).string(message.attachment_link);
|
|
14211
|
+
}
|
|
14212
|
+
if (message.display_name !== "") {
|
|
14213
|
+
writer.uint32(74).string(message.display_name);
|
|
14214
|
+
}
|
|
14215
|
+
if (message.create_time_seconds !== 0) {
|
|
14216
|
+
writer.uint32(80).int32(message.create_time_seconds);
|
|
14217
|
+
}
|
|
14218
|
+
if (message.update_time_seconds !== 0) {
|
|
14219
|
+
writer.uint32(88).int32(message.update_time_seconds);
|
|
14220
|
+
}
|
|
14221
|
+
if (message.username !== "") {
|
|
14222
|
+
writer.uint32(98).string(message.username);
|
|
14223
|
+
}
|
|
14224
|
+
for (const v of message.mention_ids) {
|
|
14225
|
+
writer.uint32(106).string(v);
|
|
14226
|
+
}
|
|
14227
|
+
writer.uint32(114).fork();
|
|
14228
|
+
for (const v of message.position_s) {
|
|
14229
|
+
writer.int32(v);
|
|
14230
|
+
}
|
|
14231
|
+
writer.ldelim();
|
|
14232
|
+
writer.uint32(122).fork();
|
|
14233
|
+
for (const v of message.position_e) {
|
|
14234
|
+
writer.int32(v);
|
|
14235
|
+
}
|
|
14236
|
+
writer.ldelim();
|
|
14237
|
+
if (message.attachment_type !== "") {
|
|
14238
|
+
writer.uint32(130).string(message.attachment_type);
|
|
14239
|
+
}
|
|
14240
|
+
if (message.has_more_attachment !== false) {
|
|
14241
|
+
writer.uint32(136).bool(message.has_more_attachment);
|
|
14242
|
+
}
|
|
14243
|
+
writer.uint32(146).fork();
|
|
14244
|
+
for (const v of message.is_mention_role) {
|
|
14245
|
+
writer.bool(v);
|
|
14246
|
+
}
|
|
14247
|
+
writer.ldelim();
|
|
14248
|
+
return writer;
|
|
14249
|
+
},
|
|
14250
|
+
decode(input, length) {
|
|
14251
|
+
const reader = input instanceof import_minimal3.default.Reader ? input : import_minimal3.default.Reader.create(input);
|
|
14252
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
14253
|
+
const message = createBaseDirectFcmProto();
|
|
14254
|
+
while (reader.pos < end) {
|
|
14255
|
+
const tag = reader.uint32();
|
|
14256
|
+
switch (tag >>> 3) {
|
|
14257
|
+
case 1:
|
|
14258
|
+
if (tag !== 10) {
|
|
14259
|
+
break;
|
|
14260
|
+
}
|
|
14261
|
+
message.title = reader.string();
|
|
14262
|
+
continue;
|
|
14263
|
+
case 2:
|
|
14264
|
+
if (tag !== 18) {
|
|
14265
|
+
break;
|
|
14266
|
+
}
|
|
14267
|
+
message.link = reader.string();
|
|
14268
|
+
continue;
|
|
14269
|
+
case 3:
|
|
14270
|
+
if (tag !== 26) {
|
|
14271
|
+
break;
|
|
14272
|
+
}
|
|
14273
|
+
message.content = reader.string();
|
|
14274
|
+
continue;
|
|
14275
|
+
case 4:
|
|
14276
|
+
if (tag !== 34) {
|
|
14277
|
+
break;
|
|
14278
|
+
}
|
|
14279
|
+
message.channel_id = reader.string();
|
|
14280
|
+
continue;
|
|
14281
|
+
case 5:
|
|
14282
|
+
if (tag !== 42) {
|
|
14283
|
+
break;
|
|
14284
|
+
}
|
|
14285
|
+
message.sender_id = reader.string();
|
|
14286
|
+
continue;
|
|
14287
|
+
case 6:
|
|
14288
|
+
if (tag !== 50) {
|
|
14289
|
+
break;
|
|
14290
|
+
}
|
|
14291
|
+
message.avatar = reader.string();
|
|
14292
|
+
continue;
|
|
14293
|
+
case 7:
|
|
14294
|
+
if (tag !== 58) {
|
|
14295
|
+
break;
|
|
14296
|
+
}
|
|
14297
|
+
message.clan_id = reader.string();
|
|
14298
|
+
continue;
|
|
14299
|
+
case 8:
|
|
14300
|
+
if (tag !== 66) {
|
|
14301
|
+
break;
|
|
14302
|
+
}
|
|
14303
|
+
message.attachment_link = reader.string();
|
|
14304
|
+
continue;
|
|
14305
|
+
case 9:
|
|
14306
|
+
if (tag !== 74) {
|
|
14307
|
+
break;
|
|
14308
|
+
}
|
|
14309
|
+
message.display_name = reader.string();
|
|
14310
|
+
continue;
|
|
14311
|
+
case 10:
|
|
14312
|
+
if (tag !== 80) {
|
|
14313
|
+
break;
|
|
14314
|
+
}
|
|
14315
|
+
message.create_time_seconds = reader.int32();
|
|
14316
|
+
continue;
|
|
14317
|
+
case 11:
|
|
14318
|
+
if (tag !== 88) {
|
|
14319
|
+
break;
|
|
14320
|
+
}
|
|
14321
|
+
message.update_time_seconds = reader.int32();
|
|
14322
|
+
continue;
|
|
14323
|
+
case 12:
|
|
14324
|
+
if (tag !== 98) {
|
|
14325
|
+
break;
|
|
14326
|
+
}
|
|
14327
|
+
message.username = reader.string();
|
|
14328
|
+
continue;
|
|
14329
|
+
case 13:
|
|
14330
|
+
if (tag !== 106) {
|
|
14331
|
+
break;
|
|
14332
|
+
}
|
|
14333
|
+
message.mention_ids.push(reader.string());
|
|
14334
|
+
continue;
|
|
14335
|
+
case 14:
|
|
14336
|
+
if (tag === 112) {
|
|
14337
|
+
message.position_s.push(reader.int32());
|
|
14338
|
+
continue;
|
|
14339
|
+
}
|
|
14340
|
+
if (tag === 114) {
|
|
14341
|
+
const end2 = reader.uint32() + reader.pos;
|
|
14342
|
+
while (reader.pos < end2) {
|
|
14343
|
+
message.position_s.push(reader.int32());
|
|
14344
|
+
}
|
|
14345
|
+
continue;
|
|
14346
|
+
}
|
|
14347
|
+
break;
|
|
14348
|
+
case 15:
|
|
14349
|
+
if (tag === 120) {
|
|
14350
|
+
message.position_e.push(reader.int32());
|
|
14351
|
+
continue;
|
|
14352
|
+
}
|
|
14353
|
+
if (tag === 122) {
|
|
14354
|
+
const end2 = reader.uint32() + reader.pos;
|
|
14355
|
+
while (reader.pos < end2) {
|
|
14356
|
+
message.position_e.push(reader.int32());
|
|
14357
|
+
}
|
|
14358
|
+
continue;
|
|
14359
|
+
}
|
|
14360
|
+
break;
|
|
14361
|
+
case 16:
|
|
14362
|
+
if (tag !== 130) {
|
|
14363
|
+
break;
|
|
14364
|
+
}
|
|
14365
|
+
message.attachment_type = reader.string();
|
|
14366
|
+
continue;
|
|
14367
|
+
case 17:
|
|
14368
|
+
if (tag !== 136) {
|
|
14369
|
+
break;
|
|
14370
|
+
}
|
|
14371
|
+
message.has_more_attachment = reader.bool();
|
|
14372
|
+
continue;
|
|
14373
|
+
case 18:
|
|
14374
|
+
if (tag === 144) {
|
|
14375
|
+
message.is_mention_role.push(reader.bool());
|
|
14376
|
+
continue;
|
|
14377
|
+
}
|
|
14378
|
+
if (tag === 146) {
|
|
14379
|
+
const end2 = reader.uint32() + reader.pos;
|
|
14380
|
+
while (reader.pos < end2) {
|
|
14381
|
+
message.is_mention_role.push(reader.bool());
|
|
14382
|
+
}
|
|
14383
|
+
continue;
|
|
14384
|
+
}
|
|
14385
|
+
break;
|
|
14386
|
+
}
|
|
14387
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
14388
|
+
break;
|
|
14389
|
+
}
|
|
14390
|
+
reader.skipType(tag & 7);
|
|
14391
|
+
}
|
|
14392
|
+
return message;
|
|
14393
|
+
},
|
|
14394
|
+
fromJSON(object) {
|
|
14395
|
+
return {
|
|
14396
|
+
title: isSet2(object.title) ? globalThis.String(object.title) : "",
|
|
14397
|
+
link: isSet2(object.link) ? globalThis.String(object.link) : "",
|
|
14398
|
+
content: isSet2(object.content) ? globalThis.String(object.content) : "",
|
|
14399
|
+
channel_id: isSet2(object.channel_id) ? globalThis.String(object.channel_id) : "",
|
|
14400
|
+
sender_id: isSet2(object.sender_id) ? globalThis.String(object.sender_id) : "",
|
|
14401
|
+
avatar: isSet2(object.avatar) ? globalThis.String(object.avatar) : "",
|
|
14402
|
+
clan_id: isSet2(object.clan_id) ? globalThis.String(object.clan_id) : "",
|
|
14403
|
+
attachment_link: isSet2(object.attachment_link) ? globalThis.String(object.attachment_link) : "",
|
|
14404
|
+
display_name: isSet2(object.display_name) ? globalThis.String(object.display_name) : "",
|
|
14405
|
+
create_time_seconds: isSet2(object.create_time_seconds) ? globalThis.Number(object.create_time_seconds) : 0,
|
|
14406
|
+
update_time_seconds: isSet2(object.update_time_seconds) ? globalThis.Number(object.update_time_seconds) : 0,
|
|
14407
|
+
username: isSet2(object.username) ? globalThis.String(object.username) : "",
|
|
14408
|
+
mention_ids: globalThis.Array.isArray(object == null ? void 0 : object.mention_ids) ? object.mention_ids.map((e) => globalThis.String(e)) : [],
|
|
14409
|
+
position_s: globalThis.Array.isArray(object == null ? void 0 : object.position_s) ? object.position_s.map((e) => globalThis.Number(e)) : [],
|
|
14410
|
+
position_e: globalThis.Array.isArray(object == null ? void 0 : object.position_e) ? object.position_e.map((e) => globalThis.Number(e)) : [],
|
|
14411
|
+
attachment_type: isSet2(object.attachment_type) ? globalThis.String(object.attachment_type) : "",
|
|
14412
|
+
has_more_attachment: isSet2(object.has_more_attachment) ? globalThis.Boolean(object.has_more_attachment) : false,
|
|
14413
|
+
is_mention_role: globalThis.Array.isArray(object == null ? void 0 : object.is_mention_role) ? object.is_mention_role.map((e) => globalThis.Boolean(e)) : []
|
|
14414
|
+
};
|
|
14415
|
+
},
|
|
14416
|
+
toJSON(message) {
|
|
14417
|
+
var _a, _b, _c, _d;
|
|
14418
|
+
const obj = {};
|
|
14419
|
+
if (message.title !== "") {
|
|
14420
|
+
obj.title = message.title;
|
|
14421
|
+
}
|
|
14422
|
+
if (message.link !== "") {
|
|
14423
|
+
obj.link = message.link;
|
|
14424
|
+
}
|
|
14425
|
+
if (message.content !== "") {
|
|
14426
|
+
obj.content = message.content;
|
|
14427
|
+
}
|
|
14428
|
+
if (message.channel_id !== "") {
|
|
14429
|
+
obj.channel_id = message.channel_id;
|
|
14430
|
+
}
|
|
14431
|
+
if (message.sender_id !== "") {
|
|
14432
|
+
obj.sender_id = message.sender_id;
|
|
14433
|
+
}
|
|
14434
|
+
if (message.avatar !== "") {
|
|
14435
|
+
obj.avatar = message.avatar;
|
|
14436
|
+
}
|
|
14437
|
+
if (message.clan_id !== "") {
|
|
14438
|
+
obj.clan_id = message.clan_id;
|
|
14439
|
+
}
|
|
14440
|
+
if (message.attachment_link !== "") {
|
|
14441
|
+
obj.attachment_link = message.attachment_link;
|
|
14442
|
+
}
|
|
14443
|
+
if (message.display_name !== "") {
|
|
14444
|
+
obj.display_name = message.display_name;
|
|
14445
|
+
}
|
|
14446
|
+
if (message.create_time_seconds !== 0) {
|
|
14447
|
+
obj.create_time_seconds = Math.round(message.create_time_seconds);
|
|
14448
|
+
}
|
|
14449
|
+
if (message.update_time_seconds !== 0) {
|
|
14450
|
+
obj.update_time_seconds = Math.round(message.update_time_seconds);
|
|
14451
|
+
}
|
|
14452
|
+
if (message.username !== "") {
|
|
14453
|
+
obj.username = message.username;
|
|
14454
|
+
}
|
|
14455
|
+
if ((_a = message.mention_ids) == null ? void 0 : _a.length) {
|
|
14456
|
+
obj.mention_ids = message.mention_ids;
|
|
14457
|
+
}
|
|
14458
|
+
if ((_b = message.position_s) == null ? void 0 : _b.length) {
|
|
14459
|
+
obj.position_s = message.position_s.map((e) => Math.round(e));
|
|
14460
|
+
}
|
|
14461
|
+
if ((_c = message.position_e) == null ? void 0 : _c.length) {
|
|
14462
|
+
obj.position_e = message.position_e.map((e) => Math.round(e));
|
|
14463
|
+
}
|
|
14464
|
+
if (message.attachment_type !== "") {
|
|
14465
|
+
obj.attachment_type = message.attachment_type;
|
|
14466
|
+
}
|
|
14467
|
+
if (message.has_more_attachment !== false) {
|
|
14468
|
+
obj.has_more_attachment = message.has_more_attachment;
|
|
14469
|
+
}
|
|
14470
|
+
if ((_d = message.is_mention_role) == null ? void 0 : _d.length) {
|
|
14471
|
+
obj.is_mention_role = message.is_mention_role;
|
|
14472
|
+
}
|
|
14473
|
+
return obj;
|
|
14474
|
+
},
|
|
14475
|
+
create(base) {
|
|
14476
|
+
return DirectFcmProto.fromPartial(base != null ? base : {});
|
|
14477
|
+
},
|
|
14478
|
+
fromPartial(object) {
|
|
14479
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r;
|
|
14480
|
+
const message = createBaseDirectFcmProto();
|
|
14481
|
+
message.title = (_a = object.title) != null ? _a : "";
|
|
14482
|
+
message.link = (_b = object.link) != null ? _b : "";
|
|
14483
|
+
message.content = (_c = object.content) != null ? _c : "";
|
|
14484
|
+
message.channel_id = (_d = object.channel_id) != null ? _d : "";
|
|
14485
|
+
message.sender_id = (_e = object.sender_id) != null ? _e : "";
|
|
14486
|
+
message.avatar = (_f = object.avatar) != null ? _f : "";
|
|
14487
|
+
message.clan_id = (_g = object.clan_id) != null ? _g : "";
|
|
14488
|
+
message.attachment_link = (_h = object.attachment_link) != null ? _h : "";
|
|
14489
|
+
message.display_name = (_i = object.display_name) != null ? _i : "";
|
|
14490
|
+
message.create_time_seconds = (_j = object.create_time_seconds) != null ? _j : 0;
|
|
14491
|
+
message.update_time_seconds = (_k = object.update_time_seconds) != null ? _k : 0;
|
|
14492
|
+
message.username = (_l = object.username) != null ? _l : "";
|
|
14493
|
+
message.mention_ids = ((_m = object.mention_ids) == null ? void 0 : _m.map((e) => e)) || [];
|
|
14494
|
+
message.position_s = ((_n = object.position_s) == null ? void 0 : _n.map((e) => e)) || [];
|
|
14495
|
+
message.position_e = ((_o = object.position_e) == null ? void 0 : _o.map((e) => e)) || [];
|
|
14496
|
+
message.attachment_type = (_p = object.attachment_type) != null ? _p : "";
|
|
14497
|
+
message.has_more_attachment = (_q = object.has_more_attachment) != null ? _q : false;
|
|
14498
|
+
message.is_mention_role = ((_r = object.is_mention_role) == null ? void 0 : _r.map((e) => e)) || [];
|
|
14499
|
+
return message;
|
|
14500
|
+
}
|
|
14501
|
+
};
|
|
14165
14502
|
function createBaseMessageMentionList() {
|
|
14166
14503
|
return { mentions: [] };
|
|
14167
14504
|
}
|
|
@@ -26632,12 +26969,6 @@ function decodeReactions(data) {
|
|
|
26632
26969
|
function decodeNotificationFcm(data) {
|
|
26633
26970
|
const buffer = data;
|
|
26634
26971
|
const uintBuffer = new Uint8Array(buffer);
|
|
26635
|
-
const noti =
|
|
26972
|
+
const noti = DirectFcmProto.decode(uintBuffer);
|
|
26636
26973
|
return noti;
|
|
26637
26974
|
}
|
|
26638
|
-
function decodeNotificationContent(data) {
|
|
26639
|
-
const uint8Array = new Uint8Array(data);
|
|
26640
|
-
const decoder = new TextDecoder("utf-8");
|
|
26641
|
-
const notiContent = decoder.decode(uint8Array);
|
|
26642
|
-
return notiContent;
|
|
26643
|
-
}
|
|
@@ -14143,6 +14143,344 @@ var SearchThreadRequest = {
|
|
|
14143
14143
|
return message;
|
|
14144
14144
|
}
|
|
14145
14145
|
};
|
|
14146
|
+
function createBaseDirectFcmProto() {
|
|
14147
|
+
return {
|
|
14148
|
+
title: "",
|
|
14149
|
+
link: "",
|
|
14150
|
+
content: "",
|
|
14151
|
+
channel_id: "",
|
|
14152
|
+
sender_id: "",
|
|
14153
|
+
avatar: "",
|
|
14154
|
+
clan_id: "",
|
|
14155
|
+
attachment_link: "",
|
|
14156
|
+
display_name: "",
|
|
14157
|
+
create_time_seconds: 0,
|
|
14158
|
+
update_time_seconds: 0,
|
|
14159
|
+
username: "",
|
|
14160
|
+
mention_ids: [],
|
|
14161
|
+
position_s: [],
|
|
14162
|
+
position_e: [],
|
|
14163
|
+
attachment_type: "",
|
|
14164
|
+
has_more_attachment: false,
|
|
14165
|
+
is_mention_role: []
|
|
14166
|
+
};
|
|
14167
|
+
}
|
|
14168
|
+
var DirectFcmProto = {
|
|
14169
|
+
encode(message, writer = import_minimal3.default.Writer.create()) {
|
|
14170
|
+
if (message.title !== "") {
|
|
14171
|
+
writer.uint32(10).string(message.title);
|
|
14172
|
+
}
|
|
14173
|
+
if (message.link !== "") {
|
|
14174
|
+
writer.uint32(18).string(message.link);
|
|
14175
|
+
}
|
|
14176
|
+
if (message.content !== "") {
|
|
14177
|
+
writer.uint32(26).string(message.content);
|
|
14178
|
+
}
|
|
14179
|
+
if (message.channel_id !== "") {
|
|
14180
|
+
writer.uint32(34).string(message.channel_id);
|
|
14181
|
+
}
|
|
14182
|
+
if (message.sender_id !== "") {
|
|
14183
|
+
writer.uint32(42).string(message.sender_id);
|
|
14184
|
+
}
|
|
14185
|
+
if (message.avatar !== "") {
|
|
14186
|
+
writer.uint32(50).string(message.avatar);
|
|
14187
|
+
}
|
|
14188
|
+
if (message.clan_id !== "") {
|
|
14189
|
+
writer.uint32(58).string(message.clan_id);
|
|
14190
|
+
}
|
|
14191
|
+
if (message.attachment_link !== "") {
|
|
14192
|
+
writer.uint32(66).string(message.attachment_link);
|
|
14193
|
+
}
|
|
14194
|
+
if (message.display_name !== "") {
|
|
14195
|
+
writer.uint32(74).string(message.display_name);
|
|
14196
|
+
}
|
|
14197
|
+
if (message.create_time_seconds !== 0) {
|
|
14198
|
+
writer.uint32(80).int32(message.create_time_seconds);
|
|
14199
|
+
}
|
|
14200
|
+
if (message.update_time_seconds !== 0) {
|
|
14201
|
+
writer.uint32(88).int32(message.update_time_seconds);
|
|
14202
|
+
}
|
|
14203
|
+
if (message.username !== "") {
|
|
14204
|
+
writer.uint32(98).string(message.username);
|
|
14205
|
+
}
|
|
14206
|
+
for (const v of message.mention_ids) {
|
|
14207
|
+
writer.uint32(106).string(v);
|
|
14208
|
+
}
|
|
14209
|
+
writer.uint32(114).fork();
|
|
14210
|
+
for (const v of message.position_s) {
|
|
14211
|
+
writer.int32(v);
|
|
14212
|
+
}
|
|
14213
|
+
writer.ldelim();
|
|
14214
|
+
writer.uint32(122).fork();
|
|
14215
|
+
for (const v of message.position_e) {
|
|
14216
|
+
writer.int32(v);
|
|
14217
|
+
}
|
|
14218
|
+
writer.ldelim();
|
|
14219
|
+
if (message.attachment_type !== "") {
|
|
14220
|
+
writer.uint32(130).string(message.attachment_type);
|
|
14221
|
+
}
|
|
14222
|
+
if (message.has_more_attachment !== false) {
|
|
14223
|
+
writer.uint32(136).bool(message.has_more_attachment);
|
|
14224
|
+
}
|
|
14225
|
+
writer.uint32(146).fork();
|
|
14226
|
+
for (const v of message.is_mention_role) {
|
|
14227
|
+
writer.bool(v);
|
|
14228
|
+
}
|
|
14229
|
+
writer.ldelim();
|
|
14230
|
+
return writer;
|
|
14231
|
+
},
|
|
14232
|
+
decode(input, length) {
|
|
14233
|
+
const reader = input instanceof import_minimal3.default.Reader ? input : import_minimal3.default.Reader.create(input);
|
|
14234
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
14235
|
+
const message = createBaseDirectFcmProto();
|
|
14236
|
+
while (reader.pos < end) {
|
|
14237
|
+
const tag = reader.uint32();
|
|
14238
|
+
switch (tag >>> 3) {
|
|
14239
|
+
case 1:
|
|
14240
|
+
if (tag !== 10) {
|
|
14241
|
+
break;
|
|
14242
|
+
}
|
|
14243
|
+
message.title = reader.string();
|
|
14244
|
+
continue;
|
|
14245
|
+
case 2:
|
|
14246
|
+
if (tag !== 18) {
|
|
14247
|
+
break;
|
|
14248
|
+
}
|
|
14249
|
+
message.link = reader.string();
|
|
14250
|
+
continue;
|
|
14251
|
+
case 3:
|
|
14252
|
+
if (tag !== 26) {
|
|
14253
|
+
break;
|
|
14254
|
+
}
|
|
14255
|
+
message.content = reader.string();
|
|
14256
|
+
continue;
|
|
14257
|
+
case 4:
|
|
14258
|
+
if (tag !== 34) {
|
|
14259
|
+
break;
|
|
14260
|
+
}
|
|
14261
|
+
message.channel_id = reader.string();
|
|
14262
|
+
continue;
|
|
14263
|
+
case 5:
|
|
14264
|
+
if (tag !== 42) {
|
|
14265
|
+
break;
|
|
14266
|
+
}
|
|
14267
|
+
message.sender_id = reader.string();
|
|
14268
|
+
continue;
|
|
14269
|
+
case 6:
|
|
14270
|
+
if (tag !== 50) {
|
|
14271
|
+
break;
|
|
14272
|
+
}
|
|
14273
|
+
message.avatar = reader.string();
|
|
14274
|
+
continue;
|
|
14275
|
+
case 7:
|
|
14276
|
+
if (tag !== 58) {
|
|
14277
|
+
break;
|
|
14278
|
+
}
|
|
14279
|
+
message.clan_id = reader.string();
|
|
14280
|
+
continue;
|
|
14281
|
+
case 8:
|
|
14282
|
+
if (tag !== 66) {
|
|
14283
|
+
break;
|
|
14284
|
+
}
|
|
14285
|
+
message.attachment_link = reader.string();
|
|
14286
|
+
continue;
|
|
14287
|
+
case 9:
|
|
14288
|
+
if (tag !== 74) {
|
|
14289
|
+
break;
|
|
14290
|
+
}
|
|
14291
|
+
message.display_name = reader.string();
|
|
14292
|
+
continue;
|
|
14293
|
+
case 10:
|
|
14294
|
+
if (tag !== 80) {
|
|
14295
|
+
break;
|
|
14296
|
+
}
|
|
14297
|
+
message.create_time_seconds = reader.int32();
|
|
14298
|
+
continue;
|
|
14299
|
+
case 11:
|
|
14300
|
+
if (tag !== 88) {
|
|
14301
|
+
break;
|
|
14302
|
+
}
|
|
14303
|
+
message.update_time_seconds = reader.int32();
|
|
14304
|
+
continue;
|
|
14305
|
+
case 12:
|
|
14306
|
+
if (tag !== 98) {
|
|
14307
|
+
break;
|
|
14308
|
+
}
|
|
14309
|
+
message.username = reader.string();
|
|
14310
|
+
continue;
|
|
14311
|
+
case 13:
|
|
14312
|
+
if (tag !== 106) {
|
|
14313
|
+
break;
|
|
14314
|
+
}
|
|
14315
|
+
message.mention_ids.push(reader.string());
|
|
14316
|
+
continue;
|
|
14317
|
+
case 14:
|
|
14318
|
+
if (tag === 112) {
|
|
14319
|
+
message.position_s.push(reader.int32());
|
|
14320
|
+
continue;
|
|
14321
|
+
}
|
|
14322
|
+
if (tag === 114) {
|
|
14323
|
+
const end2 = reader.uint32() + reader.pos;
|
|
14324
|
+
while (reader.pos < end2) {
|
|
14325
|
+
message.position_s.push(reader.int32());
|
|
14326
|
+
}
|
|
14327
|
+
continue;
|
|
14328
|
+
}
|
|
14329
|
+
break;
|
|
14330
|
+
case 15:
|
|
14331
|
+
if (tag === 120) {
|
|
14332
|
+
message.position_e.push(reader.int32());
|
|
14333
|
+
continue;
|
|
14334
|
+
}
|
|
14335
|
+
if (tag === 122) {
|
|
14336
|
+
const end2 = reader.uint32() + reader.pos;
|
|
14337
|
+
while (reader.pos < end2) {
|
|
14338
|
+
message.position_e.push(reader.int32());
|
|
14339
|
+
}
|
|
14340
|
+
continue;
|
|
14341
|
+
}
|
|
14342
|
+
break;
|
|
14343
|
+
case 16:
|
|
14344
|
+
if (tag !== 130) {
|
|
14345
|
+
break;
|
|
14346
|
+
}
|
|
14347
|
+
message.attachment_type = reader.string();
|
|
14348
|
+
continue;
|
|
14349
|
+
case 17:
|
|
14350
|
+
if (tag !== 136) {
|
|
14351
|
+
break;
|
|
14352
|
+
}
|
|
14353
|
+
message.has_more_attachment = reader.bool();
|
|
14354
|
+
continue;
|
|
14355
|
+
case 18:
|
|
14356
|
+
if (tag === 144) {
|
|
14357
|
+
message.is_mention_role.push(reader.bool());
|
|
14358
|
+
continue;
|
|
14359
|
+
}
|
|
14360
|
+
if (tag === 146) {
|
|
14361
|
+
const end2 = reader.uint32() + reader.pos;
|
|
14362
|
+
while (reader.pos < end2) {
|
|
14363
|
+
message.is_mention_role.push(reader.bool());
|
|
14364
|
+
}
|
|
14365
|
+
continue;
|
|
14366
|
+
}
|
|
14367
|
+
break;
|
|
14368
|
+
}
|
|
14369
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
14370
|
+
break;
|
|
14371
|
+
}
|
|
14372
|
+
reader.skipType(tag & 7);
|
|
14373
|
+
}
|
|
14374
|
+
return message;
|
|
14375
|
+
},
|
|
14376
|
+
fromJSON(object) {
|
|
14377
|
+
return {
|
|
14378
|
+
title: isSet2(object.title) ? globalThis.String(object.title) : "",
|
|
14379
|
+
link: isSet2(object.link) ? globalThis.String(object.link) : "",
|
|
14380
|
+
content: isSet2(object.content) ? globalThis.String(object.content) : "",
|
|
14381
|
+
channel_id: isSet2(object.channel_id) ? globalThis.String(object.channel_id) : "",
|
|
14382
|
+
sender_id: isSet2(object.sender_id) ? globalThis.String(object.sender_id) : "",
|
|
14383
|
+
avatar: isSet2(object.avatar) ? globalThis.String(object.avatar) : "",
|
|
14384
|
+
clan_id: isSet2(object.clan_id) ? globalThis.String(object.clan_id) : "",
|
|
14385
|
+
attachment_link: isSet2(object.attachment_link) ? globalThis.String(object.attachment_link) : "",
|
|
14386
|
+
display_name: isSet2(object.display_name) ? globalThis.String(object.display_name) : "",
|
|
14387
|
+
create_time_seconds: isSet2(object.create_time_seconds) ? globalThis.Number(object.create_time_seconds) : 0,
|
|
14388
|
+
update_time_seconds: isSet2(object.update_time_seconds) ? globalThis.Number(object.update_time_seconds) : 0,
|
|
14389
|
+
username: isSet2(object.username) ? globalThis.String(object.username) : "",
|
|
14390
|
+
mention_ids: globalThis.Array.isArray(object == null ? void 0 : object.mention_ids) ? object.mention_ids.map((e) => globalThis.String(e)) : [],
|
|
14391
|
+
position_s: globalThis.Array.isArray(object == null ? void 0 : object.position_s) ? object.position_s.map((e) => globalThis.Number(e)) : [],
|
|
14392
|
+
position_e: globalThis.Array.isArray(object == null ? void 0 : object.position_e) ? object.position_e.map((e) => globalThis.Number(e)) : [],
|
|
14393
|
+
attachment_type: isSet2(object.attachment_type) ? globalThis.String(object.attachment_type) : "",
|
|
14394
|
+
has_more_attachment: isSet2(object.has_more_attachment) ? globalThis.Boolean(object.has_more_attachment) : false,
|
|
14395
|
+
is_mention_role: globalThis.Array.isArray(object == null ? void 0 : object.is_mention_role) ? object.is_mention_role.map((e) => globalThis.Boolean(e)) : []
|
|
14396
|
+
};
|
|
14397
|
+
},
|
|
14398
|
+
toJSON(message) {
|
|
14399
|
+
var _a, _b, _c, _d;
|
|
14400
|
+
const obj = {};
|
|
14401
|
+
if (message.title !== "") {
|
|
14402
|
+
obj.title = message.title;
|
|
14403
|
+
}
|
|
14404
|
+
if (message.link !== "") {
|
|
14405
|
+
obj.link = message.link;
|
|
14406
|
+
}
|
|
14407
|
+
if (message.content !== "") {
|
|
14408
|
+
obj.content = message.content;
|
|
14409
|
+
}
|
|
14410
|
+
if (message.channel_id !== "") {
|
|
14411
|
+
obj.channel_id = message.channel_id;
|
|
14412
|
+
}
|
|
14413
|
+
if (message.sender_id !== "") {
|
|
14414
|
+
obj.sender_id = message.sender_id;
|
|
14415
|
+
}
|
|
14416
|
+
if (message.avatar !== "") {
|
|
14417
|
+
obj.avatar = message.avatar;
|
|
14418
|
+
}
|
|
14419
|
+
if (message.clan_id !== "") {
|
|
14420
|
+
obj.clan_id = message.clan_id;
|
|
14421
|
+
}
|
|
14422
|
+
if (message.attachment_link !== "") {
|
|
14423
|
+
obj.attachment_link = message.attachment_link;
|
|
14424
|
+
}
|
|
14425
|
+
if (message.display_name !== "") {
|
|
14426
|
+
obj.display_name = message.display_name;
|
|
14427
|
+
}
|
|
14428
|
+
if (message.create_time_seconds !== 0) {
|
|
14429
|
+
obj.create_time_seconds = Math.round(message.create_time_seconds);
|
|
14430
|
+
}
|
|
14431
|
+
if (message.update_time_seconds !== 0) {
|
|
14432
|
+
obj.update_time_seconds = Math.round(message.update_time_seconds);
|
|
14433
|
+
}
|
|
14434
|
+
if (message.username !== "") {
|
|
14435
|
+
obj.username = message.username;
|
|
14436
|
+
}
|
|
14437
|
+
if ((_a = message.mention_ids) == null ? void 0 : _a.length) {
|
|
14438
|
+
obj.mention_ids = message.mention_ids;
|
|
14439
|
+
}
|
|
14440
|
+
if ((_b = message.position_s) == null ? void 0 : _b.length) {
|
|
14441
|
+
obj.position_s = message.position_s.map((e) => Math.round(e));
|
|
14442
|
+
}
|
|
14443
|
+
if ((_c = message.position_e) == null ? void 0 : _c.length) {
|
|
14444
|
+
obj.position_e = message.position_e.map((e) => Math.round(e));
|
|
14445
|
+
}
|
|
14446
|
+
if (message.attachment_type !== "") {
|
|
14447
|
+
obj.attachment_type = message.attachment_type;
|
|
14448
|
+
}
|
|
14449
|
+
if (message.has_more_attachment !== false) {
|
|
14450
|
+
obj.has_more_attachment = message.has_more_attachment;
|
|
14451
|
+
}
|
|
14452
|
+
if ((_d = message.is_mention_role) == null ? void 0 : _d.length) {
|
|
14453
|
+
obj.is_mention_role = message.is_mention_role;
|
|
14454
|
+
}
|
|
14455
|
+
return obj;
|
|
14456
|
+
},
|
|
14457
|
+
create(base) {
|
|
14458
|
+
return DirectFcmProto.fromPartial(base != null ? base : {});
|
|
14459
|
+
},
|
|
14460
|
+
fromPartial(object) {
|
|
14461
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r;
|
|
14462
|
+
const message = createBaseDirectFcmProto();
|
|
14463
|
+
message.title = (_a = object.title) != null ? _a : "";
|
|
14464
|
+
message.link = (_b = object.link) != null ? _b : "";
|
|
14465
|
+
message.content = (_c = object.content) != null ? _c : "";
|
|
14466
|
+
message.channel_id = (_d = object.channel_id) != null ? _d : "";
|
|
14467
|
+
message.sender_id = (_e = object.sender_id) != null ? _e : "";
|
|
14468
|
+
message.avatar = (_f = object.avatar) != null ? _f : "";
|
|
14469
|
+
message.clan_id = (_g = object.clan_id) != null ? _g : "";
|
|
14470
|
+
message.attachment_link = (_h = object.attachment_link) != null ? _h : "";
|
|
14471
|
+
message.display_name = (_i = object.display_name) != null ? _i : "";
|
|
14472
|
+
message.create_time_seconds = (_j = object.create_time_seconds) != null ? _j : 0;
|
|
14473
|
+
message.update_time_seconds = (_k = object.update_time_seconds) != null ? _k : 0;
|
|
14474
|
+
message.username = (_l = object.username) != null ? _l : "";
|
|
14475
|
+
message.mention_ids = ((_m = object.mention_ids) == null ? void 0 : _m.map((e) => e)) || [];
|
|
14476
|
+
message.position_s = ((_n = object.position_s) == null ? void 0 : _n.map((e) => e)) || [];
|
|
14477
|
+
message.position_e = ((_o = object.position_e) == null ? void 0 : _o.map((e) => e)) || [];
|
|
14478
|
+
message.attachment_type = (_p = object.attachment_type) != null ? _p : "";
|
|
14479
|
+
message.has_more_attachment = (_q = object.has_more_attachment) != null ? _q : false;
|
|
14480
|
+
message.is_mention_role = ((_r = object.is_mention_role) == null ? void 0 : _r.map((e) => e)) || [];
|
|
14481
|
+
return message;
|
|
14482
|
+
}
|
|
14483
|
+
};
|
|
14146
14484
|
function createBaseMessageMentionList() {
|
|
14147
14485
|
return { mentions: [] };
|
|
14148
14486
|
}
|
|
@@ -26613,20 +26951,13 @@ function decodeReactions(data) {
|
|
|
26613
26951
|
function decodeNotificationFcm(data) {
|
|
26614
26952
|
const buffer = data;
|
|
26615
26953
|
const uintBuffer = new Uint8Array(buffer);
|
|
26616
|
-
const noti =
|
|
26954
|
+
const noti = DirectFcmProto.decode(uintBuffer);
|
|
26617
26955
|
return noti;
|
|
26618
26956
|
}
|
|
26619
|
-
function decodeNotificationContent(data) {
|
|
26620
|
-
const uint8Array = new Uint8Array(data);
|
|
26621
|
-
const decoder = new TextDecoder("utf-8");
|
|
26622
|
-
const notiContent = decoder.decode(uint8Array);
|
|
26623
|
-
return notiContent;
|
|
26624
|
-
}
|
|
26625
26957
|
export {
|
|
26626
26958
|
WebSocketAdapterPb,
|
|
26627
26959
|
decodeAttachments,
|
|
26628
26960
|
decodeMentions,
|
|
26629
|
-
decodeNotificationContent,
|
|
26630
26961
|
decodeNotificationFcm,
|
|
26631
26962
|
decodeReactions,
|
|
26632
26963
|
decodeRefs
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mezon-js-protobuf",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.83",
|
|
4
4
|
"description": "Websocket adapter adding protocol buffer support to the Mezon Javascript client.",
|
|
5
5
|
"main": "dist/mezon-js-protobuf.cjs.js",
|
|
6
6
|
"module": "dist/mezon-js-protobuf.esm.mjs",
|
package/utils.ts
CHANGED
|
@@ -34,15 +34,7 @@ export function decodeReactions(data: any) {
|
|
|
34
34
|
export function decodeNotificationFcm(data: any) {
|
|
35
35
|
const buffer: ArrayBuffer = data;
|
|
36
36
|
const uintBuffer: Uint8Array = new Uint8Array(buffer);
|
|
37
|
-
const noti = tsproto.
|
|
37
|
+
const noti = tsproto.DirectFcmProto.decode(uintBuffer);
|
|
38
38
|
|
|
39
39
|
return noti;
|
|
40
40
|
}
|
|
41
|
-
|
|
42
|
-
export function decodeNotificationContent(data: any) {
|
|
43
|
-
const uint8Array = new Uint8Array(data);
|
|
44
|
-
const decoder = new TextDecoder("utf-8");
|
|
45
|
-
const notiContent = decoder.decode(uint8Array);
|
|
46
|
-
|
|
47
|
-
return notiContent;
|
|
48
|
-
}
|