mezon-js-protobuf 1.7.45 → 1.7.47

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.
@@ -4071,7 +4071,7 @@ function createBaseChannelMessageHeader() {
4071
4071
  sender_id: "",
4072
4072
  content: "",
4073
4073
  attachment: "",
4074
- referece: "",
4074
+ reference: "",
4075
4075
  mention: "",
4076
4076
  reaction: "",
4077
4077
  repliers: []
@@ -4094,8 +4094,8 @@ var ChannelMessageHeader = {
4094
4094
  if (message.attachment !== "") {
4095
4095
  writer.uint32(42).string(message.attachment);
4096
4096
  }
4097
- if (message.referece !== "") {
4098
- writer.uint32(50).string(message.referece);
4097
+ if (message.reference !== "") {
4098
+ writer.uint32(50).string(message.reference);
4099
4099
  }
4100
4100
  if (message.mention !== "") {
4101
4101
  writer.uint32(58).string(message.mention);
@@ -4149,7 +4149,7 @@ var ChannelMessageHeader = {
4149
4149
  if (tag !== 50) {
4150
4150
  break;
4151
4151
  }
4152
- message.referece = reader.string();
4152
+ message.reference = reader.string();
4153
4153
  continue;
4154
4154
  case 7:
4155
4155
  if (tag !== 58) {
@@ -4184,7 +4184,7 @@ var ChannelMessageHeader = {
4184
4184
  sender_id: isSet3(object.sender_id) ? globalThis.String(object.sender_id) : "",
4185
4185
  content: isSet3(object.content) ? globalThis.String(object.content) : "",
4186
4186
  attachment: isSet3(object.attachment) ? globalThis.String(object.attachment) : "",
4187
- referece: isSet3(object.referece) ? globalThis.String(object.referece) : "",
4187
+ reference: isSet3(object.reference) ? globalThis.String(object.reference) : "",
4188
4188
  mention: isSet3(object.mention) ? globalThis.String(object.mention) : "",
4189
4189
  reaction: isSet3(object.reaction) ? globalThis.String(object.reaction) : "",
4190
4190
  repliers: globalThis.Array.isArray(object == null ? void 0 : object.repliers) ? object.repliers.map((e) => globalThis.String(e)) : []
@@ -4208,8 +4208,8 @@ var ChannelMessageHeader = {
4208
4208
  if (message.attachment !== "") {
4209
4209
  obj.attachment = message.attachment;
4210
4210
  }
4211
- if (message.referece !== "") {
4212
- obj.referece = message.referece;
4211
+ if (message.reference !== "") {
4212
+ obj.reference = message.reference;
4213
4213
  }
4214
4214
  if (message.mention !== "") {
4215
4215
  obj.mention = message.mention;
@@ -4233,7 +4233,7 @@ var ChannelMessageHeader = {
4233
4233
  message.sender_id = (_c = object.sender_id) != null ? _c : "";
4234
4234
  message.content = (_d = object.content) != null ? _d : "";
4235
4235
  message.attachment = (_e = object.attachment) != null ? _e : "";
4236
- message.referece = (_f = object.referece) != null ? _f : "";
4236
+ message.reference = (_f = object.reference) != null ? _f : "";
4237
4237
  message.mention = (_g = object.mention) != null ? _g : "";
4238
4238
  message.reaction = (_h = object.reaction) != null ? _h : "";
4239
4239
  message.repliers = ((_i = object.repliers) == null ? void 0 : _i.map((e) => e)) || [];
@@ -10700,12 +10700,12 @@ var MessageTypingEvent = {
10700
10700
  }
10701
10701
  };
10702
10702
  function createBaseVoiceLeavedEvent() {
10703
- return { ids: [], clan_id: "", voice_channel_id: "", voice_user_id: "" };
10703
+ return { id: "", clan_id: "", voice_channel_id: "", voice_user_id: "" };
10704
10704
  }
10705
10705
  var VoiceLeavedEvent = {
10706
10706
  encode(message, writer = import_minimal5.default.Writer.create()) {
10707
- for (const v of message.ids) {
10708
- writer.uint32(10).string(v);
10707
+ if (message.id !== "") {
10708
+ writer.uint32(10).string(message.id);
10709
10709
  }
10710
10710
  if (message.clan_id !== "") {
10711
10711
  writer.uint32(18).string(message.clan_id);
@@ -10729,7 +10729,7 @@ var VoiceLeavedEvent = {
10729
10729
  if (tag !== 10) {
10730
10730
  break;
10731
10731
  }
10732
- message.ids.push(reader.string());
10732
+ message.id = reader.string();
10733
10733
  continue;
10734
10734
  case 2:
10735
10735
  if (tag !== 18) {
@@ -10759,17 +10759,16 @@ var VoiceLeavedEvent = {
10759
10759
  },
10760
10760
  fromJSON(object) {
10761
10761
  return {
10762
- ids: globalThis.Array.isArray(object == null ? void 0 : object.ids) ? object.ids.map((e) => globalThis.String(e)) : [],
10762
+ id: isSet4(object.id) ? globalThis.String(object.id) : "",
10763
10763
  clan_id: isSet4(object.clan_id) ? globalThis.String(object.clan_id) : "",
10764
10764
  voice_channel_id: isSet4(object.voice_channel_id) ? globalThis.String(object.voice_channel_id) : "",
10765
10765
  voice_user_id: isSet4(object.voice_user_id) ? globalThis.String(object.voice_user_id) : ""
10766
10766
  };
10767
10767
  },
10768
10768
  toJSON(message) {
10769
- var _a;
10770
10769
  const obj = {};
10771
- if ((_a = message.ids) == null ? void 0 : _a.length) {
10772
- obj.ids = message.ids;
10770
+ if (message.id !== "") {
10771
+ obj.id = message.id;
10773
10772
  }
10774
10773
  if (message.clan_id !== "") {
10775
10774
  obj.clan_id = message.clan_id;
@@ -10788,7 +10787,7 @@ var VoiceLeavedEvent = {
10788
10787
  fromPartial(object) {
10789
10788
  var _a, _b, _c, _d;
10790
10789
  const message = createBaseVoiceLeavedEvent();
10791
- message.ids = ((_a = object.ids) == null ? void 0 : _a.map((e) => e)) || [];
10790
+ message.id = (_a = object.id) != null ? _a : "";
10792
10791
  message.clan_id = (_b = object.clan_id) != null ? _b : "";
10793
10792
  message.voice_channel_id = (_c = object.voice_channel_id) != null ? _c : "";
10794
10793
  message.voice_user_id = (_d = object.voice_user_id) != null ? _d : "";
@@ -4058,7 +4058,7 @@ function createBaseChannelMessageHeader() {
4058
4058
  sender_id: "",
4059
4059
  content: "",
4060
4060
  attachment: "",
4061
- referece: "",
4061
+ reference: "",
4062
4062
  mention: "",
4063
4063
  reaction: "",
4064
4064
  repliers: []
@@ -4081,8 +4081,8 @@ var ChannelMessageHeader = {
4081
4081
  if (message.attachment !== "") {
4082
4082
  writer.uint32(42).string(message.attachment);
4083
4083
  }
4084
- if (message.referece !== "") {
4085
- writer.uint32(50).string(message.referece);
4084
+ if (message.reference !== "") {
4085
+ writer.uint32(50).string(message.reference);
4086
4086
  }
4087
4087
  if (message.mention !== "") {
4088
4088
  writer.uint32(58).string(message.mention);
@@ -4136,7 +4136,7 @@ var ChannelMessageHeader = {
4136
4136
  if (tag !== 50) {
4137
4137
  break;
4138
4138
  }
4139
- message.referece = reader.string();
4139
+ message.reference = reader.string();
4140
4140
  continue;
4141
4141
  case 7:
4142
4142
  if (tag !== 58) {
@@ -4171,7 +4171,7 @@ var ChannelMessageHeader = {
4171
4171
  sender_id: isSet3(object.sender_id) ? globalThis.String(object.sender_id) : "",
4172
4172
  content: isSet3(object.content) ? globalThis.String(object.content) : "",
4173
4173
  attachment: isSet3(object.attachment) ? globalThis.String(object.attachment) : "",
4174
- referece: isSet3(object.referece) ? globalThis.String(object.referece) : "",
4174
+ reference: isSet3(object.reference) ? globalThis.String(object.reference) : "",
4175
4175
  mention: isSet3(object.mention) ? globalThis.String(object.mention) : "",
4176
4176
  reaction: isSet3(object.reaction) ? globalThis.String(object.reaction) : "",
4177
4177
  repliers: globalThis.Array.isArray(object == null ? void 0 : object.repliers) ? object.repliers.map((e) => globalThis.String(e)) : []
@@ -4195,8 +4195,8 @@ var ChannelMessageHeader = {
4195
4195
  if (message.attachment !== "") {
4196
4196
  obj.attachment = message.attachment;
4197
4197
  }
4198
- if (message.referece !== "") {
4199
- obj.referece = message.referece;
4198
+ if (message.reference !== "") {
4199
+ obj.reference = message.reference;
4200
4200
  }
4201
4201
  if (message.mention !== "") {
4202
4202
  obj.mention = message.mention;
@@ -4220,7 +4220,7 @@ var ChannelMessageHeader = {
4220
4220
  message.sender_id = (_c = object.sender_id) != null ? _c : "";
4221
4221
  message.content = (_d = object.content) != null ? _d : "";
4222
4222
  message.attachment = (_e = object.attachment) != null ? _e : "";
4223
- message.referece = (_f = object.referece) != null ? _f : "";
4223
+ message.reference = (_f = object.reference) != null ? _f : "";
4224
4224
  message.mention = (_g = object.mention) != null ? _g : "";
4225
4225
  message.reaction = (_h = object.reaction) != null ? _h : "";
4226
4226
  message.repliers = ((_i = object.repliers) == null ? void 0 : _i.map((e) => e)) || [];
@@ -10687,12 +10687,12 @@ var MessageTypingEvent = {
10687
10687
  }
10688
10688
  };
10689
10689
  function createBaseVoiceLeavedEvent() {
10690
- return { ids: [], clan_id: "", voice_channel_id: "", voice_user_id: "" };
10690
+ return { id: "", clan_id: "", voice_channel_id: "", voice_user_id: "" };
10691
10691
  }
10692
10692
  var VoiceLeavedEvent = {
10693
10693
  encode(message, writer = import_minimal5.default.Writer.create()) {
10694
- for (const v of message.ids) {
10695
- writer.uint32(10).string(v);
10694
+ if (message.id !== "") {
10695
+ writer.uint32(10).string(message.id);
10696
10696
  }
10697
10697
  if (message.clan_id !== "") {
10698
10698
  writer.uint32(18).string(message.clan_id);
@@ -10716,7 +10716,7 @@ var VoiceLeavedEvent = {
10716
10716
  if (tag !== 10) {
10717
10717
  break;
10718
10718
  }
10719
- message.ids.push(reader.string());
10719
+ message.id = reader.string();
10720
10720
  continue;
10721
10721
  case 2:
10722
10722
  if (tag !== 18) {
@@ -10746,17 +10746,16 @@ var VoiceLeavedEvent = {
10746
10746
  },
10747
10747
  fromJSON(object) {
10748
10748
  return {
10749
- ids: globalThis.Array.isArray(object == null ? void 0 : object.ids) ? object.ids.map((e) => globalThis.String(e)) : [],
10749
+ id: isSet4(object.id) ? globalThis.String(object.id) : "",
10750
10750
  clan_id: isSet4(object.clan_id) ? globalThis.String(object.clan_id) : "",
10751
10751
  voice_channel_id: isSet4(object.voice_channel_id) ? globalThis.String(object.voice_channel_id) : "",
10752
10752
  voice_user_id: isSet4(object.voice_user_id) ? globalThis.String(object.voice_user_id) : ""
10753
10753
  };
10754
10754
  },
10755
10755
  toJSON(message) {
10756
- var _a;
10757
10756
  const obj = {};
10758
- if ((_a = message.ids) == null ? void 0 : _a.length) {
10759
- obj.ids = message.ids;
10757
+ if (message.id !== "") {
10758
+ obj.id = message.id;
10760
10759
  }
10761
10760
  if (message.clan_id !== "") {
10762
10761
  obj.clan_id = message.clan_id;
@@ -10775,7 +10774,7 @@ var VoiceLeavedEvent = {
10775
10774
  fromPartial(object) {
10776
10775
  var _a, _b, _c, _d;
10777
10776
  const message = createBaseVoiceLeavedEvent();
10778
- message.ids = ((_a = object.ids) == null ? void 0 : _a.map((e) => e)) || [];
10777
+ message.id = (_a = object.id) != null ? _a : "";
10779
10778
  message.clan_id = (_b = object.clan_id) != null ? _b : "";
10780
10779
  message.voice_channel_id = (_c = object.voice_channel_id) != null ? _c : "";
10781
10780
  message.voice_user_id = (_d = object.voice_user_id) != null ? _d : "";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mezon-js-protobuf",
3
- "version": "1.7.45",
3
+ "version": "1.7.47",
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
@@ -830,7 +830,7 @@ export interface MessageTypingEvent {
830
830
  /** Voice Joined event */
831
831
  export interface VoiceLeavedEvent {
832
832
  /** id voice */
833
- ids: string[];
833
+ id: string;
834
834
  /** The unique identifier of the chat clan. */
835
835
  clan_id: string;
836
836
  /** voice channel name */
@@ -6777,13 +6777,13 @@ export const MessageTypingEvent = {
6777
6777
  };
6778
6778
 
6779
6779
  function createBaseVoiceLeavedEvent(): VoiceLeavedEvent {
6780
- return { ids: [], clan_id: "", voice_channel_id: "", voice_user_id: "" };
6780
+ return { id: "", clan_id: "", voice_channel_id: "", voice_user_id: "" };
6781
6781
  }
6782
6782
 
6783
6783
  export const VoiceLeavedEvent = {
6784
6784
  encode(message: VoiceLeavedEvent, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
6785
- for (const v of message.ids) {
6786
- writer.uint32(10).string(v!);
6785
+ if (message.id !== "") {
6786
+ writer.uint32(10).string(message.id);
6787
6787
  }
6788
6788
  if (message.clan_id !== "") {
6789
6789
  writer.uint32(18).string(message.clan_id);
@@ -6809,7 +6809,7 @@ export const VoiceLeavedEvent = {
6809
6809
  break;
6810
6810
  }
6811
6811
 
6812
- message.ids.push(reader.string());
6812
+ message.id = reader.string();
6813
6813
  continue;
6814
6814
  case 2:
6815
6815
  if (tag !== 18) {
@@ -6843,7 +6843,7 @@ export const VoiceLeavedEvent = {
6843
6843
 
6844
6844
  fromJSON(object: any): VoiceLeavedEvent {
6845
6845
  return {
6846
- ids: globalThis.Array.isArray(object?.ids) ? object.ids.map((e: any) => globalThis.String(e)) : [],
6846
+ id: isSet(object.id) ? globalThis.String(object.id) : "",
6847
6847
  clan_id: isSet(object.clan_id) ? globalThis.String(object.clan_id) : "",
6848
6848
  voice_channel_id: isSet(object.voice_channel_id) ? globalThis.String(object.voice_channel_id) : "",
6849
6849
  voice_user_id: isSet(object.voice_user_id) ? globalThis.String(object.voice_user_id) : "",
@@ -6852,8 +6852,8 @@ export const VoiceLeavedEvent = {
6852
6852
 
6853
6853
  toJSON(message: VoiceLeavedEvent): unknown {
6854
6854
  const obj: any = {};
6855
- if (message.ids?.length) {
6856
- obj.ids = message.ids;
6855
+ if (message.id !== "") {
6856
+ obj.id = message.id;
6857
6857
  }
6858
6858
  if (message.clan_id !== "") {
6859
6859
  obj.clan_id = message.clan_id;
@@ -6872,7 +6872,7 @@ export const VoiceLeavedEvent = {
6872
6872
  },
6873
6873
  fromPartial<I extends Exact<DeepPartial<VoiceLeavedEvent>, I>>(object: I): VoiceLeavedEvent {
6874
6874
  const message = createBaseVoiceLeavedEvent();
6875
- message.ids = object.ids?.map((e) => e) || [];
6875
+ message.id = object.id ?? "";
6876
6876
  message.clan_id = object.clan_id ?? "";
6877
6877
  message.voice_channel_id = object.voice_channel_id ?? "";
6878
6878
  message.voice_user_id = object.voice_user_id ?? "";