mezon-sdk 2.7.74 → 2.7.76
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/dist/cjs/api/api.d.ts +1217 -316
- package/dist/cjs/api/api.js +731 -465
- package/dist/cjs/api/api.js.map +1 -1
- package/dist/cjs/constants/enum.d.ts +19 -0
- package/dist/cjs/constants/enum.js +19 -0
- package/dist/cjs/constants/enum.js.map +1 -1
- package/dist/cjs/interfaces/socket.d.ts +31 -6
- package/dist/cjs/message-socket-events/user_channel_added.js +1 -1
- package/dist/cjs/message-socket-events/user_channel_added.js.map +1 -1
- package/dist/cjs/rtapi/realtime.d.ts +1862 -274
- package/dist/cjs/rtapi/realtime.js +424 -65
- package/dist/cjs/rtapi/realtime.js.map +1 -1
- package/dist/esm/api/api.d.ts +1217 -316
- package/dist/esm/api/api.js +716 -448
- package/dist/esm/api/api.js.map +1 -1
- package/dist/esm/constants/enum.d.ts +19 -0
- package/dist/esm/constants/enum.js +19 -0
- package/dist/esm/constants/enum.js.map +1 -1
- package/dist/esm/interfaces/socket.d.ts +31 -6
- package/dist/esm/message-socket-events/user_channel_added.js +1 -1
- package/dist/esm/message-socket-events/user_channel_added.js.map +1 -1
- package/dist/esm/rtapi/realtime.d.ts +1862 -274
- package/dist/esm/rtapi/realtime.js +410 -54
- package/dist/esm/rtapi/realtime.js.map +1 -1
- package/dist/tsconfig.esm.tsbuildinfo +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
// source: rtapi/realtime.proto
|
|
6
6
|
/* eslint-disable */
|
|
7
7
|
import _m0 from "protobufjs/minimal";
|
|
8
|
-
import { ChannelMessage, ChannelMessageHeader, CreateEventRequest, GiveCoffeeEvent, MessageAttachment, MessageMention, MessageReaction, MessageRef, Notification, PermissionUpdate, Role, Rpc, TokenSentEvent, UserActivity, } from "../api/api";
|
|
8
|
+
import { ChannelDescription as ChannelDescription1, ChannelMessage, ChannelMessageHeader, CreateEventRequest, GiveCoffeeEvent, MessageAttachment, MessageMention, MessageReaction, MessageRef, Notification, PermissionUpdate, Role, Rpc, TokenSentEvent, UserActivity, } from "../api/api";
|
|
9
9
|
import { Timestamp } from "../google/protobuf/timestamp";
|
|
10
10
|
import { BoolValue, Int32Value, StringValue } from "../google/protobuf/wrappers";
|
|
11
11
|
export const protobufPackage = "mezon.realtime";
|
|
@@ -157,6 +157,8 @@ function createBaseEnvelope() {
|
|
|
157
157
|
ptt_joined_event: undefined,
|
|
158
158
|
ptt_leaved_event: undefined,
|
|
159
159
|
sd_topic_event: undefined,
|
|
160
|
+
follow_event: undefined,
|
|
161
|
+
channel_app_event: undefined,
|
|
160
162
|
};
|
|
161
163
|
}
|
|
162
164
|
export const Envelope = {
|
|
@@ -371,6 +373,12 @@ export const Envelope = {
|
|
|
371
373
|
if (message.sd_topic_event !== undefined) {
|
|
372
374
|
SdTopicEvent.encode(message.sd_topic_event, writer.uint32(562).fork()).ldelim();
|
|
373
375
|
}
|
|
376
|
+
if (message.follow_event !== undefined) {
|
|
377
|
+
FollowEvent.encode(message.follow_event, writer.uint32(570).fork()).ldelim();
|
|
378
|
+
}
|
|
379
|
+
if (message.channel_app_event !== undefined) {
|
|
380
|
+
ChannelAppEvent.encode(message.channel_app_event, writer.uint32(578).fork()).ldelim();
|
|
381
|
+
}
|
|
374
382
|
return writer;
|
|
375
383
|
},
|
|
376
384
|
decode(input, length) {
|
|
@@ -800,6 +808,18 @@ export const Envelope = {
|
|
|
800
808
|
}
|
|
801
809
|
message.sd_topic_event = SdTopicEvent.decode(reader, reader.uint32());
|
|
802
810
|
continue;
|
|
811
|
+
case 71:
|
|
812
|
+
if (tag !== 570) {
|
|
813
|
+
break;
|
|
814
|
+
}
|
|
815
|
+
message.follow_event = FollowEvent.decode(reader, reader.uint32());
|
|
816
|
+
continue;
|
|
817
|
+
case 72:
|
|
818
|
+
if (tag !== 578) {
|
|
819
|
+
break;
|
|
820
|
+
}
|
|
821
|
+
message.channel_app_event = ChannelAppEvent.decode(reader, reader.uint32());
|
|
822
|
+
continue;
|
|
803
823
|
}
|
|
804
824
|
if ((tag & 7) === 4 || tag === 0) {
|
|
805
825
|
break;
|
|
@@ -968,6 +988,10 @@ export const Envelope = {
|
|
|
968
988
|
ptt_joined_event: isSet(object.ptt_joined_event) ? PTTJoinedEvent.fromJSON(object.ptt_joined_event) : undefined,
|
|
969
989
|
ptt_leaved_event: isSet(object.ptt_leaved_event) ? PTTLeavedEvent.fromJSON(object.ptt_leaved_event) : undefined,
|
|
970
990
|
sd_topic_event: isSet(object.sd_topic_event) ? SdTopicEvent.fromJSON(object.sd_topic_event) : undefined,
|
|
991
|
+
follow_event: isSet(object.follow_event) ? FollowEvent.fromJSON(object.follow_event) : undefined,
|
|
992
|
+
channel_app_event: isSet(object.channel_app_event)
|
|
993
|
+
? ChannelAppEvent.fromJSON(object.channel_app_event)
|
|
994
|
+
: undefined,
|
|
971
995
|
};
|
|
972
996
|
},
|
|
973
997
|
toJSON(message) {
|
|
@@ -1182,6 +1206,12 @@ export const Envelope = {
|
|
|
1182
1206
|
if (message.sd_topic_event !== undefined) {
|
|
1183
1207
|
obj.sd_topic_event = SdTopicEvent.toJSON(message.sd_topic_event);
|
|
1184
1208
|
}
|
|
1209
|
+
if (message.follow_event !== undefined) {
|
|
1210
|
+
obj.follow_event = FollowEvent.toJSON(message.follow_event);
|
|
1211
|
+
}
|
|
1212
|
+
if (message.channel_app_event !== undefined) {
|
|
1213
|
+
obj.channel_app_event = ChannelAppEvent.toJSON(message.channel_app_event);
|
|
1214
|
+
}
|
|
1185
1215
|
return obj;
|
|
1186
1216
|
},
|
|
1187
1217
|
create(base) {
|
|
@@ -1413,6 +1443,49 @@ export const Envelope = {
|
|
|
1413
1443
|
message.sd_topic_event = (object.sd_topic_event !== undefined && object.sd_topic_event !== null)
|
|
1414
1444
|
? SdTopicEvent.fromPartial(object.sd_topic_event)
|
|
1415
1445
|
: undefined;
|
|
1446
|
+
message.follow_event = (object.follow_event !== undefined && object.follow_event !== null)
|
|
1447
|
+
? FollowEvent.fromPartial(object.follow_event)
|
|
1448
|
+
: undefined;
|
|
1449
|
+
message.channel_app_event = (object.channel_app_event !== undefined && object.channel_app_event !== null)
|
|
1450
|
+
? ChannelAppEvent.fromPartial(object.channel_app_event)
|
|
1451
|
+
: undefined;
|
|
1452
|
+
return message;
|
|
1453
|
+
},
|
|
1454
|
+
};
|
|
1455
|
+
function createBaseFollowEvent() {
|
|
1456
|
+
return {};
|
|
1457
|
+
}
|
|
1458
|
+
export const FollowEvent = {
|
|
1459
|
+
encode(_, writer = _m0.Writer.create()) {
|
|
1460
|
+
return writer;
|
|
1461
|
+
},
|
|
1462
|
+
decode(input, length) {
|
|
1463
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
1464
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1465
|
+
const message = createBaseFollowEvent();
|
|
1466
|
+
while (reader.pos < end) {
|
|
1467
|
+
const tag = reader.uint32();
|
|
1468
|
+
switch (tag >>> 3) {
|
|
1469
|
+
}
|
|
1470
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1471
|
+
break;
|
|
1472
|
+
}
|
|
1473
|
+
reader.skipType(tag & 7);
|
|
1474
|
+
}
|
|
1475
|
+
return message;
|
|
1476
|
+
},
|
|
1477
|
+
fromJSON(_) {
|
|
1478
|
+
return {};
|
|
1479
|
+
},
|
|
1480
|
+
toJSON(_) {
|
|
1481
|
+
const obj = {};
|
|
1482
|
+
return obj;
|
|
1483
|
+
},
|
|
1484
|
+
create(base) {
|
|
1485
|
+
return FollowEvent.fromPartial(base ?? {});
|
|
1486
|
+
},
|
|
1487
|
+
fromPartial(_) {
|
|
1488
|
+
const message = createBaseFollowEvent();
|
|
1416
1489
|
return message;
|
|
1417
1490
|
},
|
|
1418
1491
|
};
|
|
@@ -3126,6 +3199,7 @@ function createBaseChannelMessageUpdate() {
|
|
|
3126
3199
|
mode: 0,
|
|
3127
3200
|
is_public: false,
|
|
3128
3201
|
hide_editted: false,
|
|
3202
|
+
topic_id: "",
|
|
3129
3203
|
};
|
|
3130
3204
|
}
|
|
3131
3205
|
export const ChannelMessageUpdate = {
|
|
@@ -3157,6 +3231,9 @@ export const ChannelMessageUpdate = {
|
|
|
3157
3231
|
if (message.hide_editted !== false) {
|
|
3158
3232
|
writer.uint32(72).bool(message.hide_editted);
|
|
3159
3233
|
}
|
|
3234
|
+
if (message.topic_id !== "") {
|
|
3235
|
+
writer.uint32(82).string(message.topic_id);
|
|
3236
|
+
}
|
|
3160
3237
|
return writer;
|
|
3161
3238
|
},
|
|
3162
3239
|
decode(input, length) {
|
|
@@ -3220,6 +3297,12 @@ export const ChannelMessageUpdate = {
|
|
|
3220
3297
|
}
|
|
3221
3298
|
message.hide_editted = reader.bool();
|
|
3222
3299
|
continue;
|
|
3300
|
+
case 10:
|
|
3301
|
+
if (tag !== 82) {
|
|
3302
|
+
break;
|
|
3303
|
+
}
|
|
3304
|
+
message.topic_id = reader.string();
|
|
3305
|
+
continue;
|
|
3223
3306
|
}
|
|
3224
3307
|
if ((tag & 7) === 4 || tag === 0) {
|
|
3225
3308
|
break;
|
|
@@ -3243,6 +3326,7 @@ export const ChannelMessageUpdate = {
|
|
|
3243
3326
|
mode: isSet(object.mode) ? globalThis.Number(object.mode) : 0,
|
|
3244
3327
|
is_public: isSet(object.is_public) ? globalThis.Boolean(object.is_public) : false,
|
|
3245
3328
|
hide_editted: isSet(object.hide_editted) ? globalThis.Boolean(object.hide_editted) : false,
|
|
3329
|
+
topic_id: isSet(object.topic_id) ? globalThis.String(object.topic_id) : "",
|
|
3246
3330
|
};
|
|
3247
3331
|
},
|
|
3248
3332
|
toJSON(message) {
|
|
@@ -3274,6 +3358,9 @@ export const ChannelMessageUpdate = {
|
|
|
3274
3358
|
if (message.hide_editted !== false) {
|
|
3275
3359
|
obj.hide_editted = message.hide_editted;
|
|
3276
3360
|
}
|
|
3361
|
+
if (message.topic_id !== "") {
|
|
3362
|
+
obj.topic_id = message.topic_id;
|
|
3363
|
+
}
|
|
3277
3364
|
return obj;
|
|
3278
3365
|
},
|
|
3279
3366
|
create(base) {
|
|
@@ -3290,11 +3377,12 @@ export const ChannelMessageUpdate = {
|
|
|
3290
3377
|
message.mode = object.mode ?? 0;
|
|
3291
3378
|
message.is_public = object.is_public ?? false;
|
|
3292
3379
|
message.hide_editted = object.hide_editted ?? false;
|
|
3380
|
+
message.topic_id = object.topic_id ?? "";
|
|
3293
3381
|
return message;
|
|
3294
3382
|
},
|
|
3295
3383
|
};
|
|
3296
3384
|
function createBaseChannelMessageRemove() {
|
|
3297
|
-
return { clan_id: "", channel_id: "", message_id: "", mode: 0, is_public: false };
|
|
3385
|
+
return { clan_id: "", channel_id: "", message_id: "", mode: 0, is_public: false, has_attachment: false };
|
|
3298
3386
|
}
|
|
3299
3387
|
export const ChannelMessageRemove = {
|
|
3300
3388
|
encode(message, writer = _m0.Writer.create()) {
|
|
@@ -3313,6 +3401,9 @@ export const ChannelMessageRemove = {
|
|
|
3313
3401
|
if (message.is_public !== false) {
|
|
3314
3402
|
writer.uint32(40).bool(message.is_public);
|
|
3315
3403
|
}
|
|
3404
|
+
if (message.has_attachment !== false) {
|
|
3405
|
+
writer.uint32(48).bool(message.has_attachment);
|
|
3406
|
+
}
|
|
3316
3407
|
return writer;
|
|
3317
3408
|
},
|
|
3318
3409
|
decode(input, length) {
|
|
@@ -3352,6 +3443,12 @@ export const ChannelMessageRemove = {
|
|
|
3352
3443
|
}
|
|
3353
3444
|
message.is_public = reader.bool();
|
|
3354
3445
|
continue;
|
|
3446
|
+
case 6:
|
|
3447
|
+
if (tag !== 48) {
|
|
3448
|
+
break;
|
|
3449
|
+
}
|
|
3450
|
+
message.has_attachment = reader.bool();
|
|
3451
|
+
continue;
|
|
3355
3452
|
}
|
|
3356
3453
|
if ((tag & 7) === 4 || tag === 0) {
|
|
3357
3454
|
break;
|
|
@@ -3367,6 +3464,7 @@ export const ChannelMessageRemove = {
|
|
|
3367
3464
|
message_id: isSet(object.message_id) ? globalThis.String(object.message_id) : "",
|
|
3368
3465
|
mode: isSet(object.mode) ? globalThis.Number(object.mode) : 0,
|
|
3369
3466
|
is_public: isSet(object.is_public) ? globalThis.Boolean(object.is_public) : false,
|
|
3467
|
+
has_attachment: isSet(object.has_attachment) ? globalThis.Boolean(object.has_attachment) : false,
|
|
3370
3468
|
};
|
|
3371
3469
|
},
|
|
3372
3470
|
toJSON(message) {
|
|
@@ -3386,6 +3484,9 @@ export const ChannelMessageRemove = {
|
|
|
3386
3484
|
if (message.is_public !== false) {
|
|
3387
3485
|
obj.is_public = message.is_public;
|
|
3388
3486
|
}
|
|
3487
|
+
if (message.has_attachment !== false) {
|
|
3488
|
+
obj.has_attachment = message.has_attachment;
|
|
3489
|
+
}
|
|
3389
3490
|
return obj;
|
|
3390
3491
|
},
|
|
3391
3492
|
create(base) {
|
|
@@ -3398,6 +3499,7 @@ export const ChannelMessageRemove = {
|
|
|
3398
3499
|
message.message_id = object.message_id ?? "";
|
|
3399
3500
|
message.mode = object.mode ?? 0;
|
|
3400
3501
|
message.is_public = object.is_public ?? false;
|
|
3502
|
+
message.has_attachment = object.has_attachment ?? false;
|
|
3401
3503
|
return message;
|
|
3402
3504
|
},
|
|
3403
3505
|
};
|
|
@@ -5382,7 +5484,15 @@ export const ChannelCreatedEvent = {
|
|
|
5382
5484
|
},
|
|
5383
5485
|
};
|
|
5384
5486
|
function createBaseRoleEvent() {
|
|
5385
|
-
return {
|
|
5487
|
+
return {
|
|
5488
|
+
role: undefined,
|
|
5489
|
+
status: 0,
|
|
5490
|
+
user_id: "",
|
|
5491
|
+
user_add_ids: [],
|
|
5492
|
+
user_remove_ids: [],
|
|
5493
|
+
active_permission_ids: [],
|
|
5494
|
+
remove_permission_ids: [],
|
|
5495
|
+
};
|
|
5386
5496
|
}
|
|
5387
5497
|
export const RoleEvent = {
|
|
5388
5498
|
encode(message, writer = _m0.Writer.create()) {
|
|
@@ -5395,6 +5505,18 @@ export const RoleEvent = {
|
|
|
5395
5505
|
if (message.user_id !== "") {
|
|
5396
5506
|
writer.uint32(26).string(message.user_id);
|
|
5397
5507
|
}
|
|
5508
|
+
for (const v of message.user_add_ids) {
|
|
5509
|
+
writer.uint32(34).string(v);
|
|
5510
|
+
}
|
|
5511
|
+
for (const v of message.user_remove_ids) {
|
|
5512
|
+
writer.uint32(42).string(v);
|
|
5513
|
+
}
|
|
5514
|
+
for (const v of message.active_permission_ids) {
|
|
5515
|
+
writer.uint32(50).string(v);
|
|
5516
|
+
}
|
|
5517
|
+
for (const v of message.remove_permission_ids) {
|
|
5518
|
+
writer.uint32(58).string(v);
|
|
5519
|
+
}
|
|
5398
5520
|
return writer;
|
|
5399
5521
|
},
|
|
5400
5522
|
decode(input, length) {
|
|
@@ -5422,6 +5544,30 @@ export const RoleEvent = {
|
|
|
5422
5544
|
}
|
|
5423
5545
|
message.user_id = reader.string();
|
|
5424
5546
|
continue;
|
|
5547
|
+
case 4:
|
|
5548
|
+
if (tag !== 34) {
|
|
5549
|
+
break;
|
|
5550
|
+
}
|
|
5551
|
+
message.user_add_ids.push(reader.string());
|
|
5552
|
+
continue;
|
|
5553
|
+
case 5:
|
|
5554
|
+
if (tag !== 42) {
|
|
5555
|
+
break;
|
|
5556
|
+
}
|
|
5557
|
+
message.user_remove_ids.push(reader.string());
|
|
5558
|
+
continue;
|
|
5559
|
+
case 6:
|
|
5560
|
+
if (tag !== 50) {
|
|
5561
|
+
break;
|
|
5562
|
+
}
|
|
5563
|
+
message.active_permission_ids.push(reader.string());
|
|
5564
|
+
continue;
|
|
5565
|
+
case 7:
|
|
5566
|
+
if (tag !== 58) {
|
|
5567
|
+
break;
|
|
5568
|
+
}
|
|
5569
|
+
message.remove_permission_ids.push(reader.string());
|
|
5570
|
+
continue;
|
|
5425
5571
|
}
|
|
5426
5572
|
if ((tag & 7) === 4 || tag === 0) {
|
|
5427
5573
|
break;
|
|
@@ -5435,6 +5581,18 @@ export const RoleEvent = {
|
|
|
5435
5581
|
role: isSet(object.role) ? Role.fromJSON(object.role) : undefined,
|
|
5436
5582
|
status: isSet(object.status) ? globalThis.Number(object.status) : 0,
|
|
5437
5583
|
user_id: isSet(object.user_id) ? globalThis.String(object.user_id) : "",
|
|
5584
|
+
user_add_ids: globalThis.Array.isArray(object?.user_add_ids)
|
|
5585
|
+
? object.user_add_ids.map((e) => globalThis.String(e))
|
|
5586
|
+
: [],
|
|
5587
|
+
user_remove_ids: globalThis.Array.isArray(object?.user_remove_ids)
|
|
5588
|
+
? object.user_remove_ids.map((e) => globalThis.String(e))
|
|
5589
|
+
: [],
|
|
5590
|
+
active_permission_ids: globalThis.Array.isArray(object?.active_permission_ids)
|
|
5591
|
+
? object.active_permission_ids.map((e) => globalThis.String(e))
|
|
5592
|
+
: [],
|
|
5593
|
+
remove_permission_ids: globalThis.Array.isArray(object?.remove_permission_ids)
|
|
5594
|
+
? object.remove_permission_ids.map((e) => globalThis.String(e))
|
|
5595
|
+
: [],
|
|
5438
5596
|
};
|
|
5439
5597
|
},
|
|
5440
5598
|
toJSON(message) {
|
|
@@ -5448,6 +5606,18 @@ export const RoleEvent = {
|
|
|
5448
5606
|
if (message.user_id !== "") {
|
|
5449
5607
|
obj.user_id = message.user_id;
|
|
5450
5608
|
}
|
|
5609
|
+
if (message.user_add_ids?.length) {
|
|
5610
|
+
obj.user_add_ids = message.user_add_ids;
|
|
5611
|
+
}
|
|
5612
|
+
if (message.user_remove_ids?.length) {
|
|
5613
|
+
obj.user_remove_ids = message.user_remove_ids;
|
|
5614
|
+
}
|
|
5615
|
+
if (message.active_permission_ids?.length) {
|
|
5616
|
+
obj.active_permission_ids = message.active_permission_ids;
|
|
5617
|
+
}
|
|
5618
|
+
if (message.remove_permission_ids?.length) {
|
|
5619
|
+
obj.remove_permission_ids = message.remove_permission_ids;
|
|
5620
|
+
}
|
|
5451
5621
|
return obj;
|
|
5452
5622
|
},
|
|
5453
5623
|
create(base) {
|
|
@@ -5458,6 +5628,10 @@ export const RoleEvent = {
|
|
|
5458
5628
|
message.role = (object.role !== undefined && object.role !== null) ? Role.fromPartial(object.role) : undefined;
|
|
5459
5629
|
message.status = object.status ?? 0;
|
|
5460
5630
|
message.user_id = object.user_id ?? "";
|
|
5631
|
+
message.user_add_ids = object.user_add_ids?.map((e) => e) || [];
|
|
5632
|
+
message.user_remove_ids = object.user_remove_ids?.map((e) => e) || [];
|
|
5633
|
+
message.active_permission_ids = object.active_permission_ids?.map((e) => e) || [];
|
|
5634
|
+
message.remove_permission_ids = object.remove_permission_ids?.map((e) => e) || [];
|
|
5461
5635
|
return message;
|
|
5462
5636
|
},
|
|
5463
5637
|
};
|
|
@@ -6819,12 +6993,20 @@ export const CustomStatusEvent = {
|
|
|
6819
6993
|
},
|
|
6820
6994
|
};
|
|
6821
6995
|
function createBaseUserChannelAdded() {
|
|
6822
|
-
return {
|
|
6996
|
+
return {
|
|
6997
|
+
channel_desc: undefined,
|
|
6998
|
+
users: [],
|
|
6999
|
+
status: "",
|
|
7000
|
+
clan_id: "",
|
|
7001
|
+
caller: undefined,
|
|
7002
|
+
create_time_second: 0,
|
|
7003
|
+
active: 0,
|
|
7004
|
+
};
|
|
6823
7005
|
}
|
|
6824
7006
|
export const UserChannelAdded = {
|
|
6825
7007
|
encode(message, writer = _m0.Writer.create()) {
|
|
6826
|
-
if (message.
|
|
6827
|
-
writer.uint32(10).
|
|
7008
|
+
if (message.channel_desc !== undefined) {
|
|
7009
|
+
ChannelDescription1.encode(message.channel_desc, writer.uint32(10).fork()).ldelim();
|
|
6828
7010
|
}
|
|
6829
7011
|
for (const v of message.users) {
|
|
6830
7012
|
UserProfileRedis.encode(v, writer.uint32(18).fork()).ldelim();
|
|
@@ -6835,14 +7017,14 @@ export const UserChannelAdded = {
|
|
|
6835
7017
|
if (message.clan_id !== "") {
|
|
6836
7018
|
writer.uint32(34).string(message.clan_id);
|
|
6837
7019
|
}
|
|
6838
|
-
if (message.
|
|
6839
|
-
writer.uint32(
|
|
7020
|
+
if (message.caller !== undefined) {
|
|
7021
|
+
UserProfileRedis.encode(message.caller, writer.uint32(42).fork()).ldelim();
|
|
6840
7022
|
}
|
|
6841
|
-
if (message.
|
|
6842
|
-
writer.uint32(48).
|
|
7023
|
+
if (message.create_time_second !== 0) {
|
|
7024
|
+
writer.uint32(48).uint32(message.create_time_second);
|
|
6843
7025
|
}
|
|
6844
|
-
if (message.
|
|
6845
|
-
writer.uint32(
|
|
7026
|
+
if (message.active !== 0) {
|
|
7027
|
+
writer.uint32(56).int32(message.active);
|
|
6846
7028
|
}
|
|
6847
7029
|
return writer;
|
|
6848
7030
|
},
|
|
@@ -6857,7 +7039,7 @@ export const UserChannelAdded = {
|
|
|
6857
7039
|
if (tag !== 10) {
|
|
6858
7040
|
break;
|
|
6859
7041
|
}
|
|
6860
|
-
message.
|
|
7042
|
+
message.channel_desc = ChannelDescription1.decode(reader, reader.uint32());
|
|
6861
7043
|
continue;
|
|
6862
7044
|
case 2:
|
|
6863
7045
|
if (tag !== 18) {
|
|
@@ -6878,22 +7060,22 @@ export const UserChannelAdded = {
|
|
|
6878
7060
|
message.clan_id = reader.string();
|
|
6879
7061
|
continue;
|
|
6880
7062
|
case 5:
|
|
6881
|
-
if (tag !==
|
|
7063
|
+
if (tag !== 42) {
|
|
6882
7064
|
break;
|
|
6883
7065
|
}
|
|
6884
|
-
message.
|
|
7066
|
+
message.caller = UserProfileRedis.decode(reader, reader.uint32());
|
|
6885
7067
|
continue;
|
|
6886
7068
|
case 6:
|
|
6887
7069
|
if (tag !== 48) {
|
|
6888
7070
|
break;
|
|
6889
7071
|
}
|
|
6890
|
-
message.
|
|
7072
|
+
message.create_time_second = reader.uint32();
|
|
6891
7073
|
continue;
|
|
6892
7074
|
case 7:
|
|
6893
|
-
if (tag !==
|
|
7075
|
+
if (tag !== 56) {
|
|
6894
7076
|
break;
|
|
6895
7077
|
}
|
|
6896
|
-
message.
|
|
7078
|
+
message.active = reader.int32();
|
|
6897
7079
|
continue;
|
|
6898
7080
|
}
|
|
6899
7081
|
if ((tag & 7) === 4 || tag === 0) {
|
|
@@ -6905,19 +7087,19 @@ export const UserChannelAdded = {
|
|
|
6905
7087
|
},
|
|
6906
7088
|
fromJSON(object) {
|
|
6907
7089
|
return {
|
|
6908
|
-
|
|
7090
|
+
channel_desc: isSet(object.channel_desc) ? ChannelDescription1.fromJSON(object.channel_desc) : undefined,
|
|
6909
7091
|
users: globalThis.Array.isArray(object?.users) ? object.users.map((e) => UserProfileRedis.fromJSON(e)) : [],
|
|
6910
7092
|
status: isSet(object.status) ? globalThis.String(object.status) : "",
|
|
6911
7093
|
clan_id: isSet(object.clan_id) ? globalThis.String(object.clan_id) : "",
|
|
6912
|
-
|
|
6913
|
-
|
|
6914
|
-
|
|
7094
|
+
caller: isSet(object.caller) ? UserProfileRedis.fromJSON(object.caller) : undefined,
|
|
7095
|
+
create_time_second: isSet(object.create_time_second) ? globalThis.Number(object.create_time_second) : 0,
|
|
7096
|
+
active: isSet(object.active) ? globalThis.Number(object.active) : 0,
|
|
6915
7097
|
};
|
|
6916
7098
|
},
|
|
6917
7099
|
toJSON(message) {
|
|
6918
7100
|
const obj = {};
|
|
6919
|
-
if (message.
|
|
6920
|
-
obj.
|
|
7101
|
+
if (message.channel_desc !== undefined) {
|
|
7102
|
+
obj.channel_desc = ChannelDescription1.toJSON(message.channel_desc);
|
|
6921
7103
|
}
|
|
6922
7104
|
if (message.users?.length) {
|
|
6923
7105
|
obj.users = message.users.map((e) => UserProfileRedis.toJSON(e));
|
|
@@ -6928,14 +7110,14 @@ export const UserChannelAdded = {
|
|
|
6928
7110
|
if (message.clan_id !== "") {
|
|
6929
7111
|
obj.clan_id = message.clan_id;
|
|
6930
7112
|
}
|
|
6931
|
-
if (message.
|
|
6932
|
-
obj.
|
|
7113
|
+
if (message.caller !== undefined) {
|
|
7114
|
+
obj.caller = UserProfileRedis.toJSON(message.caller);
|
|
6933
7115
|
}
|
|
6934
|
-
if (message.
|
|
6935
|
-
obj.
|
|
7116
|
+
if (message.create_time_second !== 0) {
|
|
7117
|
+
obj.create_time_second = Math.round(message.create_time_second);
|
|
6936
7118
|
}
|
|
6937
|
-
if (message.
|
|
6938
|
-
obj.
|
|
7119
|
+
if (message.active !== 0) {
|
|
7120
|
+
obj.active = Math.round(message.active);
|
|
6939
7121
|
}
|
|
6940
7122
|
return obj;
|
|
6941
7123
|
},
|
|
@@ -6944,13 +7126,17 @@ export const UserChannelAdded = {
|
|
|
6944
7126
|
},
|
|
6945
7127
|
fromPartial(object) {
|
|
6946
7128
|
const message = createBaseUserChannelAdded();
|
|
6947
|
-
message.
|
|
7129
|
+
message.channel_desc = (object.channel_desc !== undefined && object.channel_desc !== null)
|
|
7130
|
+
? ChannelDescription1.fromPartial(object.channel_desc)
|
|
7131
|
+
: undefined;
|
|
6948
7132
|
message.users = object.users?.map((e) => UserProfileRedis.fromPartial(e)) || [];
|
|
6949
7133
|
message.status = object.status ?? "";
|
|
6950
7134
|
message.clan_id = object.clan_id ?? "";
|
|
6951
|
-
message.
|
|
6952
|
-
|
|
6953
|
-
|
|
7135
|
+
message.caller = (object.caller !== undefined && object.caller !== null)
|
|
7136
|
+
? UserProfileRedis.fromPartial(object.caller)
|
|
7137
|
+
: undefined;
|
|
7138
|
+
message.create_time_second = object.create_time_second ?? 0;
|
|
7139
|
+
message.active = object.active ?? 0;
|
|
6954
7140
|
return message;
|
|
6955
7141
|
},
|
|
6956
7142
|
};
|
|
@@ -8175,7 +8361,7 @@ export const PermissionSetEvent = {
|
|
|
8175
8361
|
},
|
|
8176
8362
|
};
|
|
8177
8363
|
function createBasePermissionChangedEvent() {
|
|
8178
|
-
return { user_id: "", channel_id: "" };
|
|
8364
|
+
return { user_id: "", channel_id: "", add_permissions: [], remove_permissions: [], default_permissions: [] };
|
|
8179
8365
|
}
|
|
8180
8366
|
export const PermissionChangedEvent = {
|
|
8181
8367
|
encode(message, writer = _m0.Writer.create()) {
|
|
@@ -8185,6 +8371,15 @@ export const PermissionChangedEvent = {
|
|
|
8185
8371
|
if (message.channel_id !== "") {
|
|
8186
8372
|
writer.uint32(18).string(message.channel_id);
|
|
8187
8373
|
}
|
|
8374
|
+
for (const v of message.add_permissions) {
|
|
8375
|
+
PermissionUpdate.encode(v, writer.uint32(26).fork()).ldelim();
|
|
8376
|
+
}
|
|
8377
|
+
for (const v of message.remove_permissions) {
|
|
8378
|
+
PermissionUpdate.encode(v, writer.uint32(34).fork()).ldelim();
|
|
8379
|
+
}
|
|
8380
|
+
for (const v of message.default_permissions) {
|
|
8381
|
+
PermissionUpdate.encode(v, writer.uint32(42).fork()).ldelim();
|
|
8382
|
+
}
|
|
8188
8383
|
return writer;
|
|
8189
8384
|
},
|
|
8190
8385
|
decode(input, length) {
|
|
@@ -8206,6 +8401,24 @@ export const PermissionChangedEvent = {
|
|
|
8206
8401
|
}
|
|
8207
8402
|
message.channel_id = reader.string();
|
|
8208
8403
|
continue;
|
|
8404
|
+
case 3:
|
|
8405
|
+
if (tag !== 26) {
|
|
8406
|
+
break;
|
|
8407
|
+
}
|
|
8408
|
+
message.add_permissions.push(PermissionUpdate.decode(reader, reader.uint32()));
|
|
8409
|
+
continue;
|
|
8410
|
+
case 4:
|
|
8411
|
+
if (tag !== 34) {
|
|
8412
|
+
break;
|
|
8413
|
+
}
|
|
8414
|
+
message.remove_permissions.push(PermissionUpdate.decode(reader, reader.uint32()));
|
|
8415
|
+
continue;
|
|
8416
|
+
case 5:
|
|
8417
|
+
if (tag !== 42) {
|
|
8418
|
+
break;
|
|
8419
|
+
}
|
|
8420
|
+
message.default_permissions.push(PermissionUpdate.decode(reader, reader.uint32()));
|
|
8421
|
+
continue;
|
|
8209
8422
|
}
|
|
8210
8423
|
if ((tag & 7) === 4 || tag === 0) {
|
|
8211
8424
|
break;
|
|
@@ -8218,6 +8431,15 @@ export const PermissionChangedEvent = {
|
|
|
8218
8431
|
return {
|
|
8219
8432
|
user_id: isSet(object.user_id) ? globalThis.String(object.user_id) : "",
|
|
8220
8433
|
channel_id: isSet(object.channel_id) ? globalThis.String(object.channel_id) : "",
|
|
8434
|
+
add_permissions: globalThis.Array.isArray(object?.add_permissions)
|
|
8435
|
+
? object.add_permissions.map((e) => PermissionUpdate.fromJSON(e))
|
|
8436
|
+
: [],
|
|
8437
|
+
remove_permissions: globalThis.Array.isArray(object?.remove_permissions)
|
|
8438
|
+
? object.remove_permissions.map((e) => PermissionUpdate.fromJSON(e))
|
|
8439
|
+
: [],
|
|
8440
|
+
default_permissions: globalThis.Array.isArray(object?.default_permissions)
|
|
8441
|
+
? object.default_permissions.map((e) => PermissionUpdate.fromJSON(e))
|
|
8442
|
+
: [],
|
|
8221
8443
|
};
|
|
8222
8444
|
},
|
|
8223
8445
|
toJSON(message) {
|
|
@@ -8228,6 +8450,15 @@ export const PermissionChangedEvent = {
|
|
|
8228
8450
|
if (message.channel_id !== "") {
|
|
8229
8451
|
obj.channel_id = message.channel_id;
|
|
8230
8452
|
}
|
|
8453
|
+
if (message.add_permissions?.length) {
|
|
8454
|
+
obj.add_permissions = message.add_permissions.map((e) => PermissionUpdate.toJSON(e));
|
|
8455
|
+
}
|
|
8456
|
+
if (message.remove_permissions?.length) {
|
|
8457
|
+
obj.remove_permissions = message.remove_permissions.map((e) => PermissionUpdate.toJSON(e));
|
|
8458
|
+
}
|
|
8459
|
+
if (message.default_permissions?.length) {
|
|
8460
|
+
obj.default_permissions = message.default_permissions.map((e) => PermissionUpdate.toJSON(e));
|
|
8461
|
+
}
|
|
8231
8462
|
return obj;
|
|
8232
8463
|
},
|
|
8233
8464
|
create(base) {
|
|
@@ -8237,6 +8468,9 @@ export const PermissionChangedEvent = {
|
|
|
8237
8468
|
const message = createBasePermissionChangedEvent();
|
|
8238
8469
|
message.user_id = object.user_id ?? "";
|
|
8239
8470
|
message.channel_id = object.channel_id ?? "";
|
|
8471
|
+
message.add_permissions = object.add_permissions?.map((e) => PermissionUpdate.fromPartial(e)) || [];
|
|
8472
|
+
message.remove_permissions = object.remove_permissions?.map((e) => PermissionUpdate.fromPartial(e)) || [];
|
|
8473
|
+
message.default_permissions = object.default_permissions?.map((e) => PermissionUpdate.fromPartial(e)) || [];
|
|
8240
8474
|
return message;
|
|
8241
8475
|
},
|
|
8242
8476
|
};
|
|
@@ -8443,7 +8677,7 @@ export const UnmuteEvent = {
|
|
|
8443
8677
|
},
|
|
8444
8678
|
};
|
|
8445
8679
|
function createBaseJoinPTTChannel() {
|
|
8446
|
-
return { channel_id: "", data_type: 0, json_data: "",
|
|
8680
|
+
return { channel_id: "", data_type: 0, json_data: "", user_id: "", clan_id: "" };
|
|
8447
8681
|
}
|
|
8448
8682
|
export const JoinPTTChannel = {
|
|
8449
8683
|
encode(message, writer = _m0.Writer.create()) {
|
|
@@ -8456,8 +8690,8 @@ export const JoinPTTChannel = {
|
|
|
8456
8690
|
if (message.json_data !== "") {
|
|
8457
8691
|
writer.uint32(26).string(message.json_data);
|
|
8458
8692
|
}
|
|
8459
|
-
if (message.
|
|
8460
|
-
writer.uint32(34).string(message.
|
|
8693
|
+
if (message.user_id !== "") {
|
|
8694
|
+
writer.uint32(34).string(message.user_id);
|
|
8461
8695
|
}
|
|
8462
8696
|
if (message.clan_id !== "") {
|
|
8463
8697
|
writer.uint32(42).string(message.clan_id);
|
|
@@ -8493,7 +8727,7 @@ export const JoinPTTChannel = {
|
|
|
8493
8727
|
if (tag !== 34) {
|
|
8494
8728
|
break;
|
|
8495
8729
|
}
|
|
8496
|
-
message.
|
|
8730
|
+
message.user_id = reader.string();
|
|
8497
8731
|
continue;
|
|
8498
8732
|
case 5:
|
|
8499
8733
|
if (tag !== 42) {
|
|
@@ -8514,7 +8748,7 @@ export const JoinPTTChannel = {
|
|
|
8514
8748
|
channel_id: isSet(object.channel_id) ? globalThis.String(object.channel_id) : "",
|
|
8515
8749
|
data_type: isSet(object.data_type) ? globalThis.Number(object.data_type) : 0,
|
|
8516
8750
|
json_data: isSet(object.json_data) ? globalThis.String(object.json_data) : "",
|
|
8517
|
-
|
|
8751
|
+
user_id: isSet(object.user_id) ? globalThis.String(object.user_id) : "",
|
|
8518
8752
|
clan_id: isSet(object.clan_id) ? globalThis.String(object.clan_id) : "",
|
|
8519
8753
|
};
|
|
8520
8754
|
},
|
|
@@ -8529,8 +8763,8 @@ export const JoinPTTChannel = {
|
|
|
8529
8763
|
if (message.json_data !== "") {
|
|
8530
8764
|
obj.json_data = message.json_data;
|
|
8531
8765
|
}
|
|
8532
|
-
if (message.
|
|
8533
|
-
obj.
|
|
8766
|
+
if (message.user_id !== "") {
|
|
8767
|
+
obj.user_id = message.user_id;
|
|
8534
8768
|
}
|
|
8535
8769
|
if (message.clan_id !== "") {
|
|
8536
8770
|
obj.clan_id = message.clan_id;
|
|
@@ -8545,24 +8779,27 @@ export const JoinPTTChannel = {
|
|
|
8545
8779
|
message.channel_id = object.channel_id ?? "";
|
|
8546
8780
|
message.data_type = object.data_type ?? 0;
|
|
8547
8781
|
message.json_data = object.json_data ?? "";
|
|
8548
|
-
message.
|
|
8782
|
+
message.user_id = object.user_id ?? "";
|
|
8549
8783
|
message.clan_id = object.clan_id ?? "";
|
|
8550
8784
|
return message;
|
|
8551
8785
|
},
|
|
8552
8786
|
};
|
|
8553
8787
|
function createBaseTalkPTTChannel() {
|
|
8554
|
-
return { user_id: "", channel_id: "",
|
|
8788
|
+
return { user_id: "", clan_id: "", channel_id: "", is_talk: false };
|
|
8555
8789
|
}
|
|
8556
8790
|
export const TalkPTTChannel = {
|
|
8557
8791
|
encode(message, writer = _m0.Writer.create()) {
|
|
8558
8792
|
if (message.user_id !== "") {
|
|
8559
8793
|
writer.uint32(10).string(message.user_id);
|
|
8560
8794
|
}
|
|
8795
|
+
if (message.clan_id !== "") {
|
|
8796
|
+
writer.uint32(18).string(message.clan_id);
|
|
8797
|
+
}
|
|
8561
8798
|
if (message.channel_id !== "") {
|
|
8562
|
-
writer.uint32(
|
|
8799
|
+
writer.uint32(26).string(message.channel_id);
|
|
8563
8800
|
}
|
|
8564
|
-
if (message.
|
|
8565
|
-
writer.uint32(
|
|
8801
|
+
if (message.is_talk !== false) {
|
|
8802
|
+
writer.uint32(32).bool(message.is_talk);
|
|
8566
8803
|
}
|
|
8567
8804
|
return writer;
|
|
8568
8805
|
},
|
|
@@ -8583,13 +8820,19 @@ export const TalkPTTChannel = {
|
|
|
8583
8820
|
if (tag !== 18) {
|
|
8584
8821
|
break;
|
|
8585
8822
|
}
|
|
8586
|
-
message.
|
|
8823
|
+
message.clan_id = reader.string();
|
|
8587
8824
|
continue;
|
|
8588
8825
|
case 3:
|
|
8589
|
-
if (tag !==
|
|
8826
|
+
if (tag !== 26) {
|
|
8590
8827
|
break;
|
|
8591
8828
|
}
|
|
8592
|
-
message.
|
|
8829
|
+
message.channel_id = reader.string();
|
|
8830
|
+
continue;
|
|
8831
|
+
case 4:
|
|
8832
|
+
if (tag !== 32) {
|
|
8833
|
+
break;
|
|
8834
|
+
}
|
|
8835
|
+
message.is_talk = reader.bool();
|
|
8593
8836
|
continue;
|
|
8594
8837
|
}
|
|
8595
8838
|
if ((tag & 7) === 4 || tag === 0) {
|
|
@@ -8602,8 +8845,9 @@ export const TalkPTTChannel = {
|
|
|
8602
8845
|
fromJSON(object) {
|
|
8603
8846
|
return {
|
|
8604
8847
|
user_id: isSet(object.user_id) ? globalThis.String(object.user_id) : "",
|
|
8848
|
+
clan_id: isSet(object.clan_id) ? globalThis.String(object.clan_id) : "",
|
|
8605
8849
|
channel_id: isSet(object.channel_id) ? globalThis.String(object.channel_id) : "",
|
|
8606
|
-
|
|
8850
|
+
is_talk: isSet(object.is_talk) ? globalThis.Boolean(object.is_talk) : false,
|
|
8607
8851
|
};
|
|
8608
8852
|
},
|
|
8609
8853
|
toJSON(message) {
|
|
@@ -8611,11 +8855,14 @@ export const TalkPTTChannel = {
|
|
|
8611
8855
|
if (message.user_id !== "") {
|
|
8612
8856
|
obj.user_id = message.user_id;
|
|
8613
8857
|
}
|
|
8858
|
+
if (message.clan_id !== "") {
|
|
8859
|
+
obj.clan_id = message.clan_id;
|
|
8860
|
+
}
|
|
8614
8861
|
if (message.channel_id !== "") {
|
|
8615
8862
|
obj.channel_id = message.channel_id;
|
|
8616
8863
|
}
|
|
8617
|
-
if (message.
|
|
8618
|
-
obj.
|
|
8864
|
+
if (message.is_talk !== false) {
|
|
8865
|
+
obj.is_talk = message.is_talk;
|
|
8619
8866
|
}
|
|
8620
8867
|
return obj;
|
|
8621
8868
|
},
|
|
@@ -8625,8 +8872,9 @@ export const TalkPTTChannel = {
|
|
|
8625
8872
|
fromPartial(object) {
|
|
8626
8873
|
const message = createBaseTalkPTTChannel();
|
|
8627
8874
|
message.user_id = object.user_id ?? "";
|
|
8875
|
+
message.clan_id = object.clan_id ?? "";
|
|
8628
8876
|
message.channel_id = object.channel_id ?? "";
|
|
8629
|
-
message.
|
|
8877
|
+
message.is_talk = object.is_talk ?? false;
|
|
8630
8878
|
return message;
|
|
8631
8879
|
},
|
|
8632
8880
|
};
|
|
@@ -9128,6 +9376,114 @@ export const SdTopicEvent = {
|
|
|
9128
9376
|
return message;
|
|
9129
9377
|
},
|
|
9130
9378
|
};
|
|
9379
|
+
function createBaseChannelAppEvent() {
|
|
9380
|
+
return { user_id: "", username: "", clan_id: "", channel_id: "", action: 0 };
|
|
9381
|
+
}
|
|
9382
|
+
export const ChannelAppEvent = {
|
|
9383
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
9384
|
+
if (message.user_id !== "") {
|
|
9385
|
+
writer.uint32(10).string(message.user_id);
|
|
9386
|
+
}
|
|
9387
|
+
if (message.username !== "") {
|
|
9388
|
+
writer.uint32(18).string(message.username);
|
|
9389
|
+
}
|
|
9390
|
+
if (message.clan_id !== "") {
|
|
9391
|
+
writer.uint32(26).string(message.clan_id);
|
|
9392
|
+
}
|
|
9393
|
+
if (message.channel_id !== "") {
|
|
9394
|
+
writer.uint32(34).string(message.channel_id);
|
|
9395
|
+
}
|
|
9396
|
+
if (message.action !== 0) {
|
|
9397
|
+
writer.uint32(40).int32(message.action);
|
|
9398
|
+
}
|
|
9399
|
+
return writer;
|
|
9400
|
+
},
|
|
9401
|
+
decode(input, length) {
|
|
9402
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
9403
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
9404
|
+
const message = createBaseChannelAppEvent();
|
|
9405
|
+
while (reader.pos < end) {
|
|
9406
|
+
const tag = reader.uint32();
|
|
9407
|
+
switch (tag >>> 3) {
|
|
9408
|
+
case 1:
|
|
9409
|
+
if (tag !== 10) {
|
|
9410
|
+
break;
|
|
9411
|
+
}
|
|
9412
|
+
message.user_id = reader.string();
|
|
9413
|
+
continue;
|
|
9414
|
+
case 2:
|
|
9415
|
+
if (tag !== 18) {
|
|
9416
|
+
break;
|
|
9417
|
+
}
|
|
9418
|
+
message.username = reader.string();
|
|
9419
|
+
continue;
|
|
9420
|
+
case 3:
|
|
9421
|
+
if (tag !== 26) {
|
|
9422
|
+
break;
|
|
9423
|
+
}
|
|
9424
|
+
message.clan_id = reader.string();
|
|
9425
|
+
continue;
|
|
9426
|
+
case 4:
|
|
9427
|
+
if (tag !== 34) {
|
|
9428
|
+
break;
|
|
9429
|
+
}
|
|
9430
|
+
message.channel_id = reader.string();
|
|
9431
|
+
continue;
|
|
9432
|
+
case 5:
|
|
9433
|
+
if (tag !== 40) {
|
|
9434
|
+
break;
|
|
9435
|
+
}
|
|
9436
|
+
message.action = reader.int32();
|
|
9437
|
+
continue;
|
|
9438
|
+
}
|
|
9439
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
9440
|
+
break;
|
|
9441
|
+
}
|
|
9442
|
+
reader.skipType(tag & 7);
|
|
9443
|
+
}
|
|
9444
|
+
return message;
|
|
9445
|
+
},
|
|
9446
|
+
fromJSON(object) {
|
|
9447
|
+
return {
|
|
9448
|
+
user_id: isSet(object.user_id) ? globalThis.String(object.user_id) : "",
|
|
9449
|
+
username: isSet(object.username) ? globalThis.String(object.username) : "",
|
|
9450
|
+
clan_id: isSet(object.clan_id) ? globalThis.String(object.clan_id) : "",
|
|
9451
|
+
channel_id: isSet(object.channel_id) ? globalThis.String(object.channel_id) : "",
|
|
9452
|
+
action: isSet(object.action) ? globalThis.Number(object.action) : 0,
|
|
9453
|
+
};
|
|
9454
|
+
},
|
|
9455
|
+
toJSON(message) {
|
|
9456
|
+
const obj = {};
|
|
9457
|
+
if (message.user_id !== "") {
|
|
9458
|
+
obj.user_id = message.user_id;
|
|
9459
|
+
}
|
|
9460
|
+
if (message.username !== "") {
|
|
9461
|
+
obj.username = message.username;
|
|
9462
|
+
}
|
|
9463
|
+
if (message.clan_id !== "") {
|
|
9464
|
+
obj.clan_id = message.clan_id;
|
|
9465
|
+
}
|
|
9466
|
+
if (message.channel_id !== "") {
|
|
9467
|
+
obj.channel_id = message.channel_id;
|
|
9468
|
+
}
|
|
9469
|
+
if (message.action !== 0) {
|
|
9470
|
+
obj.action = Math.round(message.action);
|
|
9471
|
+
}
|
|
9472
|
+
return obj;
|
|
9473
|
+
},
|
|
9474
|
+
create(base) {
|
|
9475
|
+
return ChannelAppEvent.fromPartial(base ?? {});
|
|
9476
|
+
},
|
|
9477
|
+
fromPartial(object) {
|
|
9478
|
+
const message = createBaseChannelAppEvent();
|
|
9479
|
+
message.user_id = object.user_id ?? "";
|
|
9480
|
+
message.username = object.username ?? "";
|
|
9481
|
+
message.clan_id = object.clan_id ?? "";
|
|
9482
|
+
message.channel_id = object.channel_id ?? "";
|
|
9483
|
+
message.action = object.action ?? 0;
|
|
9484
|
+
return message;
|
|
9485
|
+
},
|
|
9486
|
+
};
|
|
9131
9487
|
function toTimestamp(date) {
|
|
9132
9488
|
const seconds = Math.trunc(date.getTime() / 1_000);
|
|
9133
9489
|
const nanos = (date.getTime() % 1_000) * 1_000_000;
|