mezon-js-protobuf 1.6.99 → 1.7.2

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.
@@ -3716,7 +3716,8 @@ function createBaseNotification() {
3716
3716
  clan_id: "",
3717
3717
  channel_id: "",
3718
3718
  channel_type: 0,
3719
- avatar_url: ""
3719
+ avatar_url: "",
3720
+ channel: void 0
3720
3721
  };
3721
3722
  }
3722
3723
  var Notification = {
@@ -3754,6 +3755,9 @@ var Notification = {
3754
3755
  if (message.avatar_url !== "") {
3755
3756
  writer.uint32(90).string(message.avatar_url);
3756
3757
  }
3758
+ if (message.channel !== void 0) {
3759
+ ChannelDescription.encode(message.channel, writer.uint32(98).fork()).ldelim();
3760
+ }
3757
3761
  return writer;
3758
3762
  },
3759
3763
  decode(input, length) {
@@ -3829,6 +3833,12 @@ var Notification = {
3829
3833
  }
3830
3834
  message.avatar_url = reader.string();
3831
3835
  continue;
3836
+ case 12:
3837
+ if (tag !== 98) {
3838
+ break;
3839
+ }
3840
+ message.channel = ChannelDescription.decode(reader, reader.uint32());
3841
+ continue;
3832
3842
  }
3833
3843
  if ((tag & 7) === 4 || tag === 0) {
3834
3844
  break;
@@ -3849,7 +3859,8 @@ var Notification = {
3849
3859
  clan_id: isSet3(object.clan_id) ? globalThis.String(object.clan_id) : "",
3850
3860
  channel_id: isSet3(object.channel_id) ? globalThis.String(object.channel_id) : "",
3851
3861
  channel_type: isSet3(object.channel_type) ? globalThis.Number(object.channel_type) : 0,
3852
- avatar_url: isSet3(object.avatar_url) ? globalThis.String(object.avatar_url) : ""
3862
+ avatar_url: isSet3(object.avatar_url) ? globalThis.String(object.avatar_url) : "",
3863
+ channel: isSet3(object.channel) ? ChannelDescription.fromJSON(object.channel) : void 0
3853
3864
  };
3854
3865
  },
3855
3866
  toJSON(message) {
@@ -3887,6 +3898,9 @@ var Notification = {
3887
3898
  if (message.avatar_url !== "") {
3888
3899
  obj.avatar_url = message.avatar_url;
3889
3900
  }
3901
+ if (message.channel !== void 0) {
3902
+ obj.channel = ChannelDescription.toJSON(message.channel);
3903
+ }
3890
3904
  return obj;
3891
3905
  },
3892
3906
  create(base) {
@@ -3906,6 +3920,7 @@ var Notification = {
3906
3920
  message.channel_id = (_i = object.channel_id) != null ? _i : "";
3907
3921
  message.channel_type = (_j = object.channel_type) != null ? _j : 0;
3908
3922
  message.avatar_url = (_k = object.avatar_url) != null ? _k : "";
3923
+ message.channel = object.channel !== void 0 && object.channel !== null ? ChannelDescription.fromPartial(object.channel) : void 0;
3909
3924
  return message;
3910
3925
  }
3911
3926
  };
@@ -8640,7 +8655,7 @@ function createBaseChannelMessageUpdate() {
8640
8655
  is_public: false,
8641
8656
  hide_editted: false,
8642
8657
  topic_id: "",
8643
- mess_topic_id: ""
8658
+ is_update_msg_topic: false
8644
8659
  };
8645
8660
  }
8646
8661
  var ChannelMessageUpdate = {
@@ -8675,8 +8690,8 @@ var ChannelMessageUpdate = {
8675
8690
  if (message.topic_id !== "") {
8676
8691
  writer.uint32(82).string(message.topic_id);
8677
8692
  }
8678
- if (message.mess_topic_id !== "") {
8679
- writer.uint32(90).string(message.mess_topic_id);
8693
+ if (message.is_update_msg_topic !== false) {
8694
+ writer.uint32(88).bool(message.is_update_msg_topic);
8680
8695
  }
8681
8696
  return writer;
8682
8697
  },
@@ -8748,10 +8763,10 @@ var ChannelMessageUpdate = {
8748
8763
  message.topic_id = reader.string();
8749
8764
  continue;
8750
8765
  case 11:
8751
- if (tag !== 90) {
8766
+ if (tag !== 88) {
8752
8767
  break;
8753
8768
  }
8754
- message.mess_topic_id = reader.string();
8769
+ message.is_update_msg_topic = reader.bool();
8755
8770
  continue;
8756
8771
  }
8757
8772
  if ((tag & 7) === 4 || tag === 0) {
@@ -8773,7 +8788,7 @@ var ChannelMessageUpdate = {
8773
8788
  is_public: isSet4(object.is_public) ? globalThis.Boolean(object.is_public) : false,
8774
8789
  hide_editted: isSet4(object.hide_editted) ? globalThis.Boolean(object.hide_editted) : false,
8775
8790
  topic_id: isSet4(object.topic_id) ? globalThis.String(object.topic_id) : "",
8776
- mess_topic_id: isSet4(object.mess_topic_id) ? globalThis.String(object.mess_topic_id) : ""
8791
+ is_update_msg_topic: isSet4(object.is_update_msg_topic) ? globalThis.Boolean(object.is_update_msg_topic) : false
8777
8792
  };
8778
8793
  },
8779
8794
  toJSON(message) {
@@ -8809,8 +8824,8 @@ var ChannelMessageUpdate = {
8809
8824
  if (message.topic_id !== "") {
8810
8825
  obj.topic_id = message.topic_id;
8811
8826
  }
8812
- if (message.mess_topic_id !== "") {
8813
- obj.mess_topic_id = message.mess_topic_id;
8827
+ if (message.is_update_msg_topic !== false) {
8828
+ obj.is_update_msg_topic = message.is_update_msg_topic;
8814
8829
  }
8815
8830
  return obj;
8816
8831
  },
@@ -8830,7 +8845,7 @@ var ChannelMessageUpdate = {
8830
8845
  message.is_public = (_h = object.is_public) != null ? _h : false;
8831
8846
  message.hide_editted = (_i = object.hide_editted) != null ? _i : false;
8832
8847
  message.topic_id = (_j = object.topic_id) != null ? _j : "";
8833
- message.mess_topic_id = (_k = object.mess_topic_id) != null ? _k : "";
8848
+ message.is_update_msg_topic = (_k = object.is_update_msg_topic) != null ? _k : false;
8834
8849
  return message;
8835
8850
  }
8836
8851
  };
@@ -3703,7 +3703,8 @@ function createBaseNotification() {
3703
3703
  clan_id: "",
3704
3704
  channel_id: "",
3705
3705
  channel_type: 0,
3706
- avatar_url: ""
3706
+ avatar_url: "",
3707
+ channel: void 0
3707
3708
  };
3708
3709
  }
3709
3710
  var Notification = {
@@ -3741,6 +3742,9 @@ var Notification = {
3741
3742
  if (message.avatar_url !== "") {
3742
3743
  writer.uint32(90).string(message.avatar_url);
3743
3744
  }
3745
+ if (message.channel !== void 0) {
3746
+ ChannelDescription.encode(message.channel, writer.uint32(98).fork()).ldelim();
3747
+ }
3744
3748
  return writer;
3745
3749
  },
3746
3750
  decode(input, length) {
@@ -3816,6 +3820,12 @@ var Notification = {
3816
3820
  }
3817
3821
  message.avatar_url = reader.string();
3818
3822
  continue;
3823
+ case 12:
3824
+ if (tag !== 98) {
3825
+ break;
3826
+ }
3827
+ message.channel = ChannelDescription.decode(reader, reader.uint32());
3828
+ continue;
3819
3829
  }
3820
3830
  if ((tag & 7) === 4 || tag === 0) {
3821
3831
  break;
@@ -3836,7 +3846,8 @@ var Notification = {
3836
3846
  clan_id: isSet3(object.clan_id) ? globalThis.String(object.clan_id) : "",
3837
3847
  channel_id: isSet3(object.channel_id) ? globalThis.String(object.channel_id) : "",
3838
3848
  channel_type: isSet3(object.channel_type) ? globalThis.Number(object.channel_type) : 0,
3839
- avatar_url: isSet3(object.avatar_url) ? globalThis.String(object.avatar_url) : ""
3849
+ avatar_url: isSet3(object.avatar_url) ? globalThis.String(object.avatar_url) : "",
3850
+ channel: isSet3(object.channel) ? ChannelDescription.fromJSON(object.channel) : void 0
3840
3851
  };
3841
3852
  },
3842
3853
  toJSON(message) {
@@ -3874,6 +3885,9 @@ var Notification = {
3874
3885
  if (message.avatar_url !== "") {
3875
3886
  obj.avatar_url = message.avatar_url;
3876
3887
  }
3888
+ if (message.channel !== void 0) {
3889
+ obj.channel = ChannelDescription.toJSON(message.channel);
3890
+ }
3877
3891
  return obj;
3878
3892
  },
3879
3893
  create(base) {
@@ -3893,6 +3907,7 @@ var Notification = {
3893
3907
  message.channel_id = (_i = object.channel_id) != null ? _i : "";
3894
3908
  message.channel_type = (_j = object.channel_type) != null ? _j : 0;
3895
3909
  message.avatar_url = (_k = object.avatar_url) != null ? _k : "";
3910
+ message.channel = object.channel !== void 0 && object.channel !== null ? ChannelDescription.fromPartial(object.channel) : void 0;
3896
3911
  return message;
3897
3912
  }
3898
3913
  };
@@ -8627,7 +8642,7 @@ function createBaseChannelMessageUpdate() {
8627
8642
  is_public: false,
8628
8643
  hide_editted: false,
8629
8644
  topic_id: "",
8630
- mess_topic_id: ""
8645
+ is_update_msg_topic: false
8631
8646
  };
8632
8647
  }
8633
8648
  var ChannelMessageUpdate = {
@@ -8662,8 +8677,8 @@ var ChannelMessageUpdate = {
8662
8677
  if (message.topic_id !== "") {
8663
8678
  writer.uint32(82).string(message.topic_id);
8664
8679
  }
8665
- if (message.mess_topic_id !== "") {
8666
- writer.uint32(90).string(message.mess_topic_id);
8680
+ if (message.is_update_msg_topic !== false) {
8681
+ writer.uint32(88).bool(message.is_update_msg_topic);
8667
8682
  }
8668
8683
  return writer;
8669
8684
  },
@@ -8735,10 +8750,10 @@ var ChannelMessageUpdate = {
8735
8750
  message.topic_id = reader.string();
8736
8751
  continue;
8737
8752
  case 11:
8738
- if (tag !== 90) {
8753
+ if (tag !== 88) {
8739
8754
  break;
8740
8755
  }
8741
- message.mess_topic_id = reader.string();
8756
+ message.is_update_msg_topic = reader.bool();
8742
8757
  continue;
8743
8758
  }
8744
8759
  if ((tag & 7) === 4 || tag === 0) {
@@ -8760,7 +8775,7 @@ var ChannelMessageUpdate = {
8760
8775
  is_public: isSet4(object.is_public) ? globalThis.Boolean(object.is_public) : false,
8761
8776
  hide_editted: isSet4(object.hide_editted) ? globalThis.Boolean(object.hide_editted) : false,
8762
8777
  topic_id: isSet4(object.topic_id) ? globalThis.String(object.topic_id) : "",
8763
- mess_topic_id: isSet4(object.mess_topic_id) ? globalThis.String(object.mess_topic_id) : ""
8778
+ is_update_msg_topic: isSet4(object.is_update_msg_topic) ? globalThis.Boolean(object.is_update_msg_topic) : false
8764
8779
  };
8765
8780
  },
8766
8781
  toJSON(message) {
@@ -8796,8 +8811,8 @@ var ChannelMessageUpdate = {
8796
8811
  if (message.topic_id !== "") {
8797
8812
  obj.topic_id = message.topic_id;
8798
8813
  }
8799
- if (message.mess_topic_id !== "") {
8800
- obj.mess_topic_id = message.mess_topic_id;
8814
+ if (message.is_update_msg_topic !== false) {
8815
+ obj.is_update_msg_topic = message.is_update_msg_topic;
8801
8816
  }
8802
8817
  return obj;
8803
8818
  },
@@ -8817,7 +8832,7 @@ var ChannelMessageUpdate = {
8817
8832
  message.is_public = (_h = object.is_public) != null ? _h : false;
8818
8833
  message.hide_editted = (_i = object.hide_editted) != null ? _i : false;
8819
8834
  message.topic_id = (_j = object.topic_id) != null ? _j : "";
8820
- message.mess_topic_id = (_k = object.mess_topic_id) != null ? _k : "";
8835
+ message.is_update_msg_topic = (_k = object.is_update_msg_topic) != null ? _k : false;
8821
8836
  return message;
8822
8837
  }
8823
8838
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mezon-js-protobuf",
3
- "version": "1.6.99",
3
+ "version": "1.7.2",
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
@@ -556,8 +556,8 @@ export interface ChannelMessageUpdate {
556
556
  hide_editted: boolean;
557
557
  /** topic id */
558
558
  topic_id: string;
559
- /** topic id */
560
- mess_topic_id: string;
559
+ /** update message topic */
560
+ is_update_msg_topic: boolean;
561
561
  }
562
562
 
563
563
  /** Remove a message previously sent to a realtime channel. */
@@ -4775,7 +4775,7 @@ function createBaseChannelMessageUpdate(): ChannelMessageUpdate {
4775
4775
  is_public: false,
4776
4776
  hide_editted: false,
4777
4777
  topic_id: "",
4778
- mess_topic_id: "",
4778
+ is_update_msg_topic: false,
4779
4779
  };
4780
4780
  }
4781
4781
 
@@ -4811,8 +4811,8 @@ export const ChannelMessageUpdate = {
4811
4811
  if (message.topic_id !== "") {
4812
4812
  writer.uint32(82).string(message.topic_id);
4813
4813
  }
4814
- if (message.mess_topic_id !== "") {
4815
- writer.uint32(90).string(message.mess_topic_id);
4814
+ if (message.is_update_msg_topic !== false) {
4815
+ writer.uint32(88).bool(message.is_update_msg_topic);
4816
4816
  }
4817
4817
  return writer;
4818
4818
  },
@@ -4895,11 +4895,11 @@ export const ChannelMessageUpdate = {
4895
4895
  message.topic_id = reader.string();
4896
4896
  continue;
4897
4897
  case 11:
4898
- if (tag !== 90) {
4898
+ if (tag !== 88) {
4899
4899
  break;
4900
4900
  }
4901
4901
 
4902
- message.mess_topic_id = reader.string();
4902
+ message.is_update_msg_topic = reader.bool();
4903
4903
  continue;
4904
4904
  }
4905
4905
  if ((tag & 7) === 4 || tag === 0) {
@@ -4926,7 +4926,7 @@ export const ChannelMessageUpdate = {
4926
4926
  is_public: isSet(object.is_public) ? globalThis.Boolean(object.is_public) : false,
4927
4927
  hide_editted: isSet(object.hide_editted) ? globalThis.Boolean(object.hide_editted) : false,
4928
4928
  topic_id: isSet(object.topic_id) ? globalThis.String(object.topic_id) : "",
4929
- mess_topic_id: isSet(object.mess_topic_id) ? globalThis.String(object.mess_topic_id) : "",
4929
+ is_update_msg_topic: isSet(object.is_update_msg_topic) ? globalThis.Boolean(object.is_update_msg_topic) : false,
4930
4930
  };
4931
4931
  },
4932
4932
 
@@ -4962,8 +4962,8 @@ export const ChannelMessageUpdate = {
4962
4962
  if (message.topic_id !== "") {
4963
4963
  obj.topic_id = message.topic_id;
4964
4964
  }
4965
- if (message.mess_topic_id !== "") {
4966
- obj.mess_topic_id = message.mess_topic_id;
4965
+ if (message.is_update_msg_topic !== false) {
4966
+ obj.is_update_msg_topic = message.is_update_msg_topic;
4967
4967
  }
4968
4968
  return obj;
4969
4969
  },
@@ -4983,7 +4983,7 @@ export const ChannelMessageUpdate = {
4983
4983
  message.is_public = object.is_public ?? false;
4984
4984
  message.hide_editted = object.hide_editted ?? false;
4985
4985
  message.topic_id = object.topic_id ?? "";
4986
- message.mess_topic_id = object.mess_topic_id ?? "";
4986
+ message.is_update_msg_topic = object.is_update_msg_topic ?? false;
4987
4987
  return message;
4988
4988
  },
4989
4989
  };