mezon-js-protobuf 1.8.80 → 1.8.82
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 +134 -36
- package/dist/mezon-js-protobuf/api/api.d.ts +52 -32
- package/dist/mezon-js-protobuf/rtapi/realtime.d.ts +117 -117
- package/dist/mezon-js-protobuf/utils.d.ts +1 -2
- package/dist/mezon-js-protobuf.cjs.js +331 -24
- package/dist/mezon-js-protobuf.esm.mjs +331 -24
- package/package.json +1 -1
- package/rtapi/realtime.ts +9 -9
- package/utils.ts +1 -9
|
@@ -2846,7 +2846,7 @@ var ChannelMessage = {
|
|
|
2846
2846
|
}
|
|
2847
2847
|
};
|
|
2848
2848
|
function createBaseMessageMention() {
|
|
2849
|
-
return { id: "", user_id: "", username: "", role_id: "", rolename: "",
|
|
2849
|
+
return { id: "", user_id: "", username: "", role_id: "", rolename: "", create_time_seconds: 0, s: 0, e: 0 };
|
|
2850
2850
|
}
|
|
2851
2851
|
var MessageMention = {
|
|
2852
2852
|
encode(message, writer = import_minimal3.default.Writer.create()) {
|
|
@@ -2865,8 +2865,8 @@ var MessageMention = {
|
|
|
2865
2865
|
if (message.rolename !== "") {
|
|
2866
2866
|
writer.uint32(42).string(message.rolename);
|
|
2867
2867
|
}
|
|
2868
|
-
if (message.
|
|
2869
|
-
writer.uint32(48).uint32(message.
|
|
2868
|
+
if (message.create_time_seconds !== 0) {
|
|
2869
|
+
writer.uint32(48).uint32(message.create_time_seconds);
|
|
2870
2870
|
}
|
|
2871
2871
|
if (message.s !== 0) {
|
|
2872
2872
|
writer.uint32(56).int32(message.s);
|
|
@@ -2917,7 +2917,7 @@ var MessageMention = {
|
|
|
2917
2917
|
if (tag !== 48) {
|
|
2918
2918
|
break;
|
|
2919
2919
|
}
|
|
2920
|
-
message.
|
|
2920
|
+
message.create_time_seconds = reader.uint32();
|
|
2921
2921
|
continue;
|
|
2922
2922
|
case 7:
|
|
2923
2923
|
if (tag !== 56) {
|
|
@@ -2946,7 +2946,7 @@ var MessageMention = {
|
|
|
2946
2946
|
username: isSet2(object.username) ? globalThis.String(object.username) : "",
|
|
2947
2947
|
role_id: isSet2(object.role_id) ? globalThis.String(object.role_id) : "",
|
|
2948
2948
|
rolename: isSet2(object.rolename) ? globalThis.String(object.rolename) : "",
|
|
2949
|
-
|
|
2949
|
+
create_time_seconds: isSet2(object.create_time_seconds) ? globalThis.Number(object.create_time_seconds) : 0,
|
|
2950
2950
|
s: isSet2(object.s) ? globalThis.Number(object.s) : 0,
|
|
2951
2951
|
e: isSet2(object.e) ? globalThis.Number(object.e) : 0
|
|
2952
2952
|
};
|
|
@@ -2968,8 +2968,8 @@ var MessageMention = {
|
|
|
2968
2968
|
if (message.rolename !== "") {
|
|
2969
2969
|
obj.rolename = message.rolename;
|
|
2970
2970
|
}
|
|
2971
|
-
if (message.
|
|
2972
|
-
obj.
|
|
2971
|
+
if (message.create_time_seconds !== 0) {
|
|
2972
|
+
obj.create_time_seconds = Math.round(message.create_time_seconds);
|
|
2973
2973
|
}
|
|
2974
2974
|
if (message.s !== 0) {
|
|
2975
2975
|
obj.s = Math.round(message.s);
|
|
@@ -2990,7 +2990,7 @@ var MessageMention = {
|
|
|
2990
2990
|
message.username = (_c = object.username) != null ? _c : "";
|
|
2991
2991
|
message.role_id = (_d = object.role_id) != null ? _d : "";
|
|
2992
2992
|
message.rolename = (_e = object.rolename) != null ? _e : "";
|
|
2993
|
-
message.
|
|
2993
|
+
message.create_time_seconds = (_f = object.create_time_seconds) != null ? _f : 0;
|
|
2994
2994
|
message.s = (_g = object.s) != null ? _g : 0;
|
|
2995
2995
|
message.e = (_h = object.e) != null ? _h : 0;
|
|
2996
2996
|
return message;
|
|
@@ -14143,6 +14143,320 @@ 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
|
+
};
|
|
14166
|
+
}
|
|
14167
|
+
var DirectFcmProto = {
|
|
14168
|
+
encode(message, writer = import_minimal3.default.Writer.create()) {
|
|
14169
|
+
if (message.title !== "") {
|
|
14170
|
+
writer.uint32(10).string(message.title);
|
|
14171
|
+
}
|
|
14172
|
+
if (message.link !== "") {
|
|
14173
|
+
writer.uint32(18).string(message.link);
|
|
14174
|
+
}
|
|
14175
|
+
if (message.content !== "") {
|
|
14176
|
+
writer.uint32(26).string(message.content);
|
|
14177
|
+
}
|
|
14178
|
+
if (message.channel_id !== "") {
|
|
14179
|
+
writer.uint32(34).string(message.channel_id);
|
|
14180
|
+
}
|
|
14181
|
+
if (message.sender_id !== "") {
|
|
14182
|
+
writer.uint32(42).string(message.sender_id);
|
|
14183
|
+
}
|
|
14184
|
+
if (message.avatar !== "") {
|
|
14185
|
+
writer.uint32(50).string(message.avatar);
|
|
14186
|
+
}
|
|
14187
|
+
if (message.clan_id !== "") {
|
|
14188
|
+
writer.uint32(58).string(message.clan_id);
|
|
14189
|
+
}
|
|
14190
|
+
if (message.attachment_link !== "") {
|
|
14191
|
+
writer.uint32(66).string(message.attachment_link);
|
|
14192
|
+
}
|
|
14193
|
+
if (message.display_name !== "") {
|
|
14194
|
+
writer.uint32(74).string(message.display_name);
|
|
14195
|
+
}
|
|
14196
|
+
if (message.create_time_seconds !== 0) {
|
|
14197
|
+
writer.uint32(80).int32(message.create_time_seconds);
|
|
14198
|
+
}
|
|
14199
|
+
if (message.update_time_seconds !== 0) {
|
|
14200
|
+
writer.uint32(88).int32(message.update_time_seconds);
|
|
14201
|
+
}
|
|
14202
|
+
if (message.username !== "") {
|
|
14203
|
+
writer.uint32(98).string(message.username);
|
|
14204
|
+
}
|
|
14205
|
+
for (const v of message.mention_ids) {
|
|
14206
|
+
writer.uint32(106).string(v);
|
|
14207
|
+
}
|
|
14208
|
+
writer.uint32(114).fork();
|
|
14209
|
+
for (const v of message.position_s) {
|
|
14210
|
+
writer.int32(v);
|
|
14211
|
+
}
|
|
14212
|
+
writer.ldelim();
|
|
14213
|
+
writer.uint32(122).fork();
|
|
14214
|
+
for (const v of message.position_e) {
|
|
14215
|
+
writer.int32(v);
|
|
14216
|
+
}
|
|
14217
|
+
writer.ldelim();
|
|
14218
|
+
if (message.attachment_type !== "") {
|
|
14219
|
+
writer.uint32(130).string(message.attachment_type);
|
|
14220
|
+
}
|
|
14221
|
+
if (message.has_more_attachment !== false) {
|
|
14222
|
+
writer.uint32(136).bool(message.has_more_attachment);
|
|
14223
|
+
}
|
|
14224
|
+
return writer;
|
|
14225
|
+
},
|
|
14226
|
+
decode(input, length) {
|
|
14227
|
+
const reader = input instanceof import_minimal3.default.Reader ? input : import_minimal3.default.Reader.create(input);
|
|
14228
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
14229
|
+
const message = createBaseDirectFcmProto();
|
|
14230
|
+
while (reader.pos < end) {
|
|
14231
|
+
const tag = reader.uint32();
|
|
14232
|
+
switch (tag >>> 3) {
|
|
14233
|
+
case 1:
|
|
14234
|
+
if (tag !== 10) {
|
|
14235
|
+
break;
|
|
14236
|
+
}
|
|
14237
|
+
message.title = reader.string();
|
|
14238
|
+
continue;
|
|
14239
|
+
case 2:
|
|
14240
|
+
if (tag !== 18) {
|
|
14241
|
+
break;
|
|
14242
|
+
}
|
|
14243
|
+
message.link = reader.string();
|
|
14244
|
+
continue;
|
|
14245
|
+
case 3:
|
|
14246
|
+
if (tag !== 26) {
|
|
14247
|
+
break;
|
|
14248
|
+
}
|
|
14249
|
+
message.content = reader.string();
|
|
14250
|
+
continue;
|
|
14251
|
+
case 4:
|
|
14252
|
+
if (tag !== 34) {
|
|
14253
|
+
break;
|
|
14254
|
+
}
|
|
14255
|
+
message.channel_id = reader.string();
|
|
14256
|
+
continue;
|
|
14257
|
+
case 5:
|
|
14258
|
+
if (tag !== 42) {
|
|
14259
|
+
break;
|
|
14260
|
+
}
|
|
14261
|
+
message.sender_id = reader.string();
|
|
14262
|
+
continue;
|
|
14263
|
+
case 6:
|
|
14264
|
+
if (tag !== 50) {
|
|
14265
|
+
break;
|
|
14266
|
+
}
|
|
14267
|
+
message.avatar = reader.string();
|
|
14268
|
+
continue;
|
|
14269
|
+
case 7:
|
|
14270
|
+
if (tag !== 58) {
|
|
14271
|
+
break;
|
|
14272
|
+
}
|
|
14273
|
+
message.clan_id = reader.string();
|
|
14274
|
+
continue;
|
|
14275
|
+
case 8:
|
|
14276
|
+
if (tag !== 66) {
|
|
14277
|
+
break;
|
|
14278
|
+
}
|
|
14279
|
+
message.attachment_link = reader.string();
|
|
14280
|
+
continue;
|
|
14281
|
+
case 9:
|
|
14282
|
+
if (tag !== 74) {
|
|
14283
|
+
break;
|
|
14284
|
+
}
|
|
14285
|
+
message.display_name = reader.string();
|
|
14286
|
+
continue;
|
|
14287
|
+
case 10:
|
|
14288
|
+
if (tag !== 80) {
|
|
14289
|
+
break;
|
|
14290
|
+
}
|
|
14291
|
+
message.create_time_seconds = reader.int32();
|
|
14292
|
+
continue;
|
|
14293
|
+
case 11:
|
|
14294
|
+
if (tag !== 88) {
|
|
14295
|
+
break;
|
|
14296
|
+
}
|
|
14297
|
+
message.update_time_seconds = reader.int32();
|
|
14298
|
+
continue;
|
|
14299
|
+
case 12:
|
|
14300
|
+
if (tag !== 98) {
|
|
14301
|
+
break;
|
|
14302
|
+
}
|
|
14303
|
+
message.username = reader.string();
|
|
14304
|
+
continue;
|
|
14305
|
+
case 13:
|
|
14306
|
+
if (tag !== 106) {
|
|
14307
|
+
break;
|
|
14308
|
+
}
|
|
14309
|
+
message.mention_ids.push(reader.string());
|
|
14310
|
+
continue;
|
|
14311
|
+
case 14:
|
|
14312
|
+
if (tag === 112) {
|
|
14313
|
+
message.position_s.push(reader.int32());
|
|
14314
|
+
continue;
|
|
14315
|
+
}
|
|
14316
|
+
if (tag === 114) {
|
|
14317
|
+
const end2 = reader.uint32() + reader.pos;
|
|
14318
|
+
while (reader.pos < end2) {
|
|
14319
|
+
message.position_s.push(reader.int32());
|
|
14320
|
+
}
|
|
14321
|
+
continue;
|
|
14322
|
+
}
|
|
14323
|
+
break;
|
|
14324
|
+
case 15:
|
|
14325
|
+
if (tag === 120) {
|
|
14326
|
+
message.position_e.push(reader.int32());
|
|
14327
|
+
continue;
|
|
14328
|
+
}
|
|
14329
|
+
if (tag === 122) {
|
|
14330
|
+
const end2 = reader.uint32() + reader.pos;
|
|
14331
|
+
while (reader.pos < end2) {
|
|
14332
|
+
message.position_e.push(reader.int32());
|
|
14333
|
+
}
|
|
14334
|
+
continue;
|
|
14335
|
+
}
|
|
14336
|
+
break;
|
|
14337
|
+
case 16:
|
|
14338
|
+
if (tag !== 130) {
|
|
14339
|
+
break;
|
|
14340
|
+
}
|
|
14341
|
+
message.attachment_type = reader.string();
|
|
14342
|
+
continue;
|
|
14343
|
+
case 17:
|
|
14344
|
+
if (tag !== 136) {
|
|
14345
|
+
break;
|
|
14346
|
+
}
|
|
14347
|
+
message.has_more_attachment = reader.bool();
|
|
14348
|
+
continue;
|
|
14349
|
+
}
|
|
14350
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
14351
|
+
break;
|
|
14352
|
+
}
|
|
14353
|
+
reader.skipType(tag & 7);
|
|
14354
|
+
}
|
|
14355
|
+
return message;
|
|
14356
|
+
},
|
|
14357
|
+
fromJSON(object) {
|
|
14358
|
+
return {
|
|
14359
|
+
title: isSet2(object.title) ? globalThis.String(object.title) : "",
|
|
14360
|
+
link: isSet2(object.link) ? globalThis.String(object.link) : "",
|
|
14361
|
+
content: isSet2(object.content) ? globalThis.String(object.content) : "",
|
|
14362
|
+
channel_id: isSet2(object.channel_id) ? globalThis.String(object.channel_id) : "",
|
|
14363
|
+
sender_id: isSet2(object.sender_id) ? globalThis.String(object.sender_id) : "",
|
|
14364
|
+
avatar: isSet2(object.avatar) ? globalThis.String(object.avatar) : "",
|
|
14365
|
+
clan_id: isSet2(object.clan_id) ? globalThis.String(object.clan_id) : "",
|
|
14366
|
+
attachment_link: isSet2(object.attachment_link) ? globalThis.String(object.attachment_link) : "",
|
|
14367
|
+
display_name: isSet2(object.display_name) ? globalThis.String(object.display_name) : "",
|
|
14368
|
+
create_time_seconds: isSet2(object.create_time_seconds) ? globalThis.Number(object.create_time_seconds) : 0,
|
|
14369
|
+
update_time_seconds: isSet2(object.update_time_seconds) ? globalThis.Number(object.update_time_seconds) : 0,
|
|
14370
|
+
username: isSet2(object.username) ? globalThis.String(object.username) : "",
|
|
14371
|
+
mention_ids: globalThis.Array.isArray(object == null ? void 0 : object.mention_ids) ? object.mention_ids.map((e) => globalThis.String(e)) : [],
|
|
14372
|
+
position_s: globalThis.Array.isArray(object == null ? void 0 : object.position_s) ? object.position_s.map((e) => globalThis.Number(e)) : [],
|
|
14373
|
+
position_e: globalThis.Array.isArray(object == null ? void 0 : object.position_e) ? object.position_e.map((e) => globalThis.Number(e)) : [],
|
|
14374
|
+
attachment_type: isSet2(object.attachment_type) ? globalThis.String(object.attachment_type) : "",
|
|
14375
|
+
has_more_attachment: isSet2(object.has_more_attachment) ? globalThis.Boolean(object.has_more_attachment) : false
|
|
14376
|
+
};
|
|
14377
|
+
},
|
|
14378
|
+
toJSON(message) {
|
|
14379
|
+
var _a, _b, _c;
|
|
14380
|
+
const obj = {};
|
|
14381
|
+
if (message.title !== "") {
|
|
14382
|
+
obj.title = message.title;
|
|
14383
|
+
}
|
|
14384
|
+
if (message.link !== "") {
|
|
14385
|
+
obj.link = message.link;
|
|
14386
|
+
}
|
|
14387
|
+
if (message.content !== "") {
|
|
14388
|
+
obj.content = message.content;
|
|
14389
|
+
}
|
|
14390
|
+
if (message.channel_id !== "") {
|
|
14391
|
+
obj.channel_id = message.channel_id;
|
|
14392
|
+
}
|
|
14393
|
+
if (message.sender_id !== "") {
|
|
14394
|
+
obj.sender_id = message.sender_id;
|
|
14395
|
+
}
|
|
14396
|
+
if (message.avatar !== "") {
|
|
14397
|
+
obj.avatar = message.avatar;
|
|
14398
|
+
}
|
|
14399
|
+
if (message.clan_id !== "") {
|
|
14400
|
+
obj.clan_id = message.clan_id;
|
|
14401
|
+
}
|
|
14402
|
+
if (message.attachment_link !== "") {
|
|
14403
|
+
obj.attachment_link = message.attachment_link;
|
|
14404
|
+
}
|
|
14405
|
+
if (message.display_name !== "") {
|
|
14406
|
+
obj.display_name = message.display_name;
|
|
14407
|
+
}
|
|
14408
|
+
if (message.create_time_seconds !== 0) {
|
|
14409
|
+
obj.create_time_seconds = Math.round(message.create_time_seconds);
|
|
14410
|
+
}
|
|
14411
|
+
if (message.update_time_seconds !== 0) {
|
|
14412
|
+
obj.update_time_seconds = Math.round(message.update_time_seconds);
|
|
14413
|
+
}
|
|
14414
|
+
if (message.username !== "") {
|
|
14415
|
+
obj.username = message.username;
|
|
14416
|
+
}
|
|
14417
|
+
if ((_a = message.mention_ids) == null ? void 0 : _a.length) {
|
|
14418
|
+
obj.mention_ids = message.mention_ids;
|
|
14419
|
+
}
|
|
14420
|
+
if ((_b = message.position_s) == null ? void 0 : _b.length) {
|
|
14421
|
+
obj.position_s = message.position_s.map((e) => Math.round(e));
|
|
14422
|
+
}
|
|
14423
|
+
if ((_c = message.position_e) == null ? void 0 : _c.length) {
|
|
14424
|
+
obj.position_e = message.position_e.map((e) => Math.round(e));
|
|
14425
|
+
}
|
|
14426
|
+
if (message.attachment_type !== "") {
|
|
14427
|
+
obj.attachment_type = message.attachment_type;
|
|
14428
|
+
}
|
|
14429
|
+
if (message.has_more_attachment !== false) {
|
|
14430
|
+
obj.has_more_attachment = message.has_more_attachment;
|
|
14431
|
+
}
|
|
14432
|
+
return obj;
|
|
14433
|
+
},
|
|
14434
|
+
create(base) {
|
|
14435
|
+
return DirectFcmProto.fromPartial(base != null ? base : {});
|
|
14436
|
+
},
|
|
14437
|
+
fromPartial(object) {
|
|
14438
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q;
|
|
14439
|
+
const message = createBaseDirectFcmProto();
|
|
14440
|
+
message.title = (_a = object.title) != null ? _a : "";
|
|
14441
|
+
message.link = (_b = object.link) != null ? _b : "";
|
|
14442
|
+
message.content = (_c = object.content) != null ? _c : "";
|
|
14443
|
+
message.channel_id = (_d = object.channel_id) != null ? _d : "";
|
|
14444
|
+
message.sender_id = (_e = object.sender_id) != null ? _e : "";
|
|
14445
|
+
message.avatar = (_f = object.avatar) != null ? _f : "";
|
|
14446
|
+
message.clan_id = (_g = object.clan_id) != null ? _g : "";
|
|
14447
|
+
message.attachment_link = (_h = object.attachment_link) != null ? _h : "";
|
|
14448
|
+
message.display_name = (_i = object.display_name) != null ? _i : "";
|
|
14449
|
+
message.create_time_seconds = (_j = object.create_time_seconds) != null ? _j : 0;
|
|
14450
|
+
message.update_time_seconds = (_k = object.update_time_seconds) != null ? _k : 0;
|
|
14451
|
+
message.username = (_l = object.username) != null ? _l : "";
|
|
14452
|
+
message.mention_ids = ((_m = object.mention_ids) == null ? void 0 : _m.map((e) => e)) || [];
|
|
14453
|
+
message.position_s = ((_n = object.position_s) == null ? void 0 : _n.map((e) => e)) || [];
|
|
14454
|
+
message.position_e = ((_o = object.position_e) == null ? void 0 : _o.map((e) => e)) || [];
|
|
14455
|
+
message.attachment_type = (_p = object.attachment_type) != null ? _p : "";
|
|
14456
|
+
message.has_more_attachment = (_q = object.has_more_attachment) != null ? _q : false;
|
|
14457
|
+
return message;
|
|
14458
|
+
}
|
|
14459
|
+
};
|
|
14146
14460
|
function createBaseMessageMentionList() {
|
|
14147
14461
|
return { mentions: [] };
|
|
14148
14462
|
}
|
|
@@ -22399,7 +22713,7 @@ function createBaseUserChannelAdded() {
|
|
|
22399
22713
|
status: "",
|
|
22400
22714
|
clan_id: "",
|
|
22401
22715
|
caller: void 0,
|
|
22402
|
-
|
|
22716
|
+
create_time_seconds: 0,
|
|
22403
22717
|
active: 0
|
|
22404
22718
|
};
|
|
22405
22719
|
}
|
|
@@ -22420,8 +22734,8 @@ var UserChannelAdded = {
|
|
|
22420
22734
|
if (message.caller !== void 0) {
|
|
22421
22735
|
UserProfileRedis.encode(message.caller, writer.uint32(42).fork()).ldelim();
|
|
22422
22736
|
}
|
|
22423
|
-
if (message.
|
|
22424
|
-
writer.uint32(48).uint32(message.
|
|
22737
|
+
if (message.create_time_seconds !== 0) {
|
|
22738
|
+
writer.uint32(48).uint32(message.create_time_seconds);
|
|
22425
22739
|
}
|
|
22426
22740
|
if (message.active !== 0) {
|
|
22427
22741
|
writer.uint32(56).int32(message.active);
|
|
@@ -22469,7 +22783,7 @@ var UserChannelAdded = {
|
|
|
22469
22783
|
if (tag !== 48) {
|
|
22470
22784
|
break;
|
|
22471
22785
|
}
|
|
22472
|
-
message.
|
|
22786
|
+
message.create_time_seconds = reader.uint32();
|
|
22473
22787
|
continue;
|
|
22474
22788
|
case 7:
|
|
22475
22789
|
if (tag !== 56) {
|
|
@@ -22492,7 +22806,7 @@ var UserChannelAdded = {
|
|
|
22492
22806
|
status: isSet3(object.status) ? globalThis.String(object.status) : "",
|
|
22493
22807
|
clan_id: isSet3(object.clan_id) ? globalThis.String(object.clan_id) : "",
|
|
22494
22808
|
caller: isSet3(object.caller) ? UserProfileRedis.fromJSON(object.caller) : void 0,
|
|
22495
|
-
|
|
22809
|
+
create_time_seconds: isSet3(object.create_time_seconds) ? globalThis.Number(object.create_time_seconds) : 0,
|
|
22496
22810
|
active: isSet3(object.active) ? globalThis.Number(object.active) : 0
|
|
22497
22811
|
};
|
|
22498
22812
|
},
|
|
@@ -22514,8 +22828,8 @@ var UserChannelAdded = {
|
|
|
22514
22828
|
if (message.caller !== void 0) {
|
|
22515
22829
|
obj.caller = UserProfileRedis.toJSON(message.caller);
|
|
22516
22830
|
}
|
|
22517
|
-
if (message.
|
|
22518
|
-
obj.
|
|
22831
|
+
if (message.create_time_seconds !== 0) {
|
|
22832
|
+
obj.create_time_seconds = Math.round(message.create_time_seconds);
|
|
22519
22833
|
}
|
|
22520
22834
|
if (message.active !== 0) {
|
|
22521
22835
|
obj.active = Math.round(message.active);
|
|
@@ -22533,7 +22847,7 @@ var UserChannelAdded = {
|
|
|
22533
22847
|
message.status = (_b = object.status) != null ? _b : "";
|
|
22534
22848
|
message.clan_id = (_c = object.clan_id) != null ? _c : "";
|
|
22535
22849
|
message.caller = object.caller !== void 0 && object.caller !== null ? UserProfileRedis.fromPartial(object.caller) : void 0;
|
|
22536
|
-
message.
|
|
22850
|
+
message.create_time_seconds = (_d = object.create_time_seconds) != null ? _d : 0;
|
|
22537
22851
|
message.active = (_e = object.active) != null ? _e : 0;
|
|
22538
22852
|
return message;
|
|
22539
22853
|
}
|
|
@@ -26613,20 +26927,13 @@ function decodeReactions(data) {
|
|
|
26613
26927
|
function decodeNotificationFcm(data) {
|
|
26614
26928
|
const buffer = data;
|
|
26615
26929
|
const uintBuffer = new Uint8Array(buffer);
|
|
26616
|
-
const noti =
|
|
26930
|
+
const noti = DirectFcmProto.decode(uintBuffer);
|
|
26617
26931
|
return noti;
|
|
26618
26932
|
}
|
|
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
26933
|
export {
|
|
26626
26934
|
WebSocketAdapterPb,
|
|
26627
26935
|
decodeAttachments,
|
|
26628
26936
|
decodeMentions,
|
|
26629
|
-
decodeNotificationContent,
|
|
26630
26937
|
decodeNotificationFcm,
|
|
26631
26938
|
decodeReactions,
|
|
26632
26939
|
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.82",
|
|
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/rtapi/realtime.ts
CHANGED
|
@@ -1398,7 +1398,7 @@ export interface UserChannelAdded {
|
|
|
1398
1398
|
| UserProfileRedis
|
|
1399
1399
|
| undefined;
|
|
1400
1400
|
/** */
|
|
1401
|
-
|
|
1401
|
+
create_time_seconds: number;
|
|
1402
1402
|
/** */
|
|
1403
1403
|
active: number;
|
|
1404
1404
|
}
|
|
@@ -11449,7 +11449,7 @@ function createBaseUserChannelAdded(): UserChannelAdded {
|
|
|
11449
11449
|
status: "",
|
|
11450
11450
|
clan_id: "",
|
|
11451
11451
|
caller: undefined,
|
|
11452
|
-
|
|
11452
|
+
create_time_seconds: 0,
|
|
11453
11453
|
active: 0,
|
|
11454
11454
|
};
|
|
11455
11455
|
}
|
|
@@ -11471,8 +11471,8 @@ export const UserChannelAdded = {
|
|
|
11471
11471
|
if (message.caller !== undefined) {
|
|
11472
11472
|
UserProfileRedis.encode(message.caller, writer.uint32(42).fork()).ldelim();
|
|
11473
11473
|
}
|
|
11474
|
-
if (message.
|
|
11475
|
-
writer.uint32(48).uint32(message.
|
|
11474
|
+
if (message.create_time_seconds !== 0) {
|
|
11475
|
+
writer.uint32(48).uint32(message.create_time_seconds);
|
|
11476
11476
|
}
|
|
11477
11477
|
if (message.active !== 0) {
|
|
11478
11478
|
writer.uint32(56).int32(message.active);
|
|
@@ -11527,7 +11527,7 @@ export const UserChannelAdded = {
|
|
|
11527
11527
|
break;
|
|
11528
11528
|
}
|
|
11529
11529
|
|
|
11530
|
-
message.
|
|
11530
|
+
message.create_time_seconds = reader.uint32();
|
|
11531
11531
|
continue;
|
|
11532
11532
|
case 7:
|
|
11533
11533
|
if (tag !== 56) {
|
|
@@ -11552,7 +11552,7 @@ export const UserChannelAdded = {
|
|
|
11552
11552
|
status: isSet(object.status) ? globalThis.String(object.status) : "",
|
|
11553
11553
|
clan_id: isSet(object.clan_id) ? globalThis.String(object.clan_id) : "",
|
|
11554
11554
|
caller: isSet(object.caller) ? UserProfileRedis.fromJSON(object.caller) : undefined,
|
|
11555
|
-
|
|
11555
|
+
create_time_seconds: isSet(object.create_time_seconds) ? globalThis.Number(object.create_time_seconds) : 0,
|
|
11556
11556
|
active: isSet(object.active) ? globalThis.Number(object.active) : 0,
|
|
11557
11557
|
};
|
|
11558
11558
|
},
|
|
@@ -11574,8 +11574,8 @@ export const UserChannelAdded = {
|
|
|
11574
11574
|
if (message.caller !== undefined) {
|
|
11575
11575
|
obj.caller = UserProfileRedis.toJSON(message.caller);
|
|
11576
11576
|
}
|
|
11577
|
-
if (message.
|
|
11578
|
-
obj.
|
|
11577
|
+
if (message.create_time_seconds !== 0) {
|
|
11578
|
+
obj.create_time_seconds = Math.round(message.create_time_seconds);
|
|
11579
11579
|
}
|
|
11580
11580
|
if (message.active !== 0) {
|
|
11581
11581
|
obj.active = Math.round(message.active);
|
|
@@ -11597,7 +11597,7 @@ export const UserChannelAdded = {
|
|
|
11597
11597
|
message.caller = (object.caller !== undefined && object.caller !== null)
|
|
11598
11598
|
? UserProfileRedis.fromPartial(object.caller)
|
|
11599
11599
|
: undefined;
|
|
11600
|
-
message.
|
|
11600
|
+
message.create_time_seconds = object.create_time_seconds ?? 0;
|
|
11601
11601
|
message.active = object.active ?? 0;
|
|
11602
11602
|
return message;
|
|
11603
11603
|
},
|
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
|
-
}
|