mezon-sdk 2.8.26 → 2.8.28

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.
Files changed (49) hide show
  1. package/dist/cjs/api/api.d.ts +357 -73
  2. package/dist/cjs/api/api.js +754 -177
  3. package/dist/cjs/api/api.js.map +1 -1
  4. package/dist/cjs/constants/enum.d.ts +4 -1
  5. package/dist/cjs/constants/enum.js +3 -0
  6. package/dist/cjs/constants/enum.js.map +1 -1
  7. package/dist/cjs/interfaces/client.d.ts +1 -0
  8. package/dist/cjs/interfaces/client.js.map +1 -1
  9. package/dist/cjs/interfaces/socket.d.ts +1 -1
  10. package/dist/cjs/mezon-client/manager/socket_manager.js +1 -1
  11. package/dist/cjs/mezon-client/manager/socket_manager.js.map +1 -1
  12. package/dist/cjs/mezon-client/structures/TextChannel.d.ts +5 -1
  13. package/dist/cjs/mezon-client/structures/TextChannel.js +47 -33
  14. package/dist/cjs/mezon-client/structures/TextChannel.js.map +1 -1
  15. package/dist/cjs/rtapi/realtime.d.ts +624 -641
  16. package/dist/cjs/rtapi/realtime.js +265 -43
  17. package/dist/cjs/rtapi/realtime.js.map +1 -1
  18. package/dist/cjs/socket.d.ts +1 -1
  19. package/dist/cjs/socket.js +2 -1
  20. package/dist/cjs/socket.js.map +1 -1
  21. package/dist/cjs/sqlite/MessageDatabase.d.ts +1 -1
  22. package/dist/cjs/sqlite/MessageDatabase.js +25 -22
  23. package/dist/cjs/sqlite/MessageDatabase.js.map +1 -1
  24. package/dist/esm/api/api.d.ts +357 -73
  25. package/dist/esm/api/api.js +718 -152
  26. package/dist/esm/api/api.js.map +1 -1
  27. package/dist/esm/constants/enum.d.ts +4 -1
  28. package/dist/esm/constants/enum.js +3 -0
  29. package/dist/esm/constants/enum.js.map +1 -1
  30. package/dist/esm/interfaces/client.d.ts +1 -0
  31. package/dist/esm/interfaces/client.js.map +1 -1
  32. package/dist/esm/interfaces/socket.d.ts +1 -1
  33. package/dist/esm/mezon-client/manager/socket_manager.js +1 -1
  34. package/dist/esm/mezon-client/manager/socket_manager.js.map +1 -1
  35. package/dist/esm/mezon-client/structures/TextChannel.d.ts +5 -1
  36. package/dist/esm/mezon-client/structures/TextChannel.js +76 -30
  37. package/dist/esm/mezon-client/structures/TextChannel.js.map +1 -1
  38. package/dist/esm/rtapi/realtime.d.ts +624 -641
  39. package/dist/esm/rtapi/realtime.js +253 -33
  40. package/dist/esm/rtapi/realtime.js.map +1 -1
  41. package/dist/esm/socket.d.ts +1 -1
  42. package/dist/esm/socket.js +2 -1
  43. package/dist/esm/socket.js.map +1 -1
  44. package/dist/esm/sqlite/MessageDatabase.d.ts +1 -1
  45. package/dist/esm/sqlite/MessageDatabase.js +24 -21
  46. package/dist/esm/sqlite/MessageDatabase.js.map +1 -1
  47. package/dist/tsconfig.esm.tsbuildinfo +1 -1
  48. package/dist/tsconfig.tsbuildinfo +1 -1
  49. package/package.json +1 -1
@@ -175,6 +175,7 @@ function createBaseEnvelope() {
175
175
  meet_participant_event: undefined,
176
176
  transfer_ownership_event: undefined,
177
177
  add_friend: undefined,
178
+ ban_user_event: undefined,
178
179
  };
179
180
  }
180
181
  export const Envelope = {
@@ -444,6 +445,9 @@ export const Envelope = {
444
445
  if (message.add_friend !== undefined) {
445
446
  AddFriend.encode(message.add_friend, writer.uint32(706).fork()).ldelim();
446
447
  }
448
+ if (message.ban_user_event !== undefined) {
449
+ BannedUserEvent.encode(message.ban_user_event, writer.uint32(714).fork()).ldelim();
450
+ }
447
451
  return writer;
448
452
  },
449
453
  decode(input, length) {
@@ -981,6 +985,12 @@ export const Envelope = {
981
985
  }
982
986
  message.add_friend = AddFriend.decode(reader, reader.uint32());
983
987
  continue;
988
+ case 89:
989
+ if (tag !== 714) {
990
+ break;
991
+ }
992
+ message.ban_user_event = BannedUserEvent.decode(reader, reader.uint32());
993
+ continue;
984
994
  }
985
995
  if ((tag & 7) === 4 || tag === 0) {
986
996
  break;
@@ -1191,6 +1201,7 @@ export const Envelope = {
1191
1201
  ? TransferOwnershipEvent.fromJSON(object.transfer_ownership_event)
1192
1202
  : undefined,
1193
1203
  add_friend: isSet(object.add_friend) ? AddFriend.fromJSON(object.add_friend) : undefined,
1204
+ ban_user_event: isSet(object.ban_user_event) ? BannedUserEvent.fromJSON(object.ban_user_event) : undefined,
1194
1205
  };
1195
1206
  },
1196
1207
  toJSON(message) {
@@ -1459,6 +1470,9 @@ export const Envelope = {
1459
1470
  if (message.add_friend !== undefined) {
1460
1471
  obj.add_friend = AddFriend.toJSON(message.add_friend);
1461
1472
  }
1473
+ if (message.ban_user_event !== undefined) {
1474
+ obj.ban_user_event = BannedUserEvent.toJSON(message.ban_user_event);
1475
+ }
1462
1476
  return obj;
1463
1477
  },
1464
1478
  create(base) {
@@ -1749,6 +1763,9 @@ export const Envelope = {
1749
1763
  message.add_friend = (object.add_friend !== undefined && object.add_friend !== null)
1750
1764
  ? AddFriend.fromPartial(object.add_friend)
1751
1765
  : undefined;
1766
+ message.ban_user_event = (object.ban_user_event !== undefined && object.ban_user_event !== null)
1767
+ ? BannedUserEvent.fromPartial(object.ban_user_event)
1768
+ : undefined;
1752
1769
  return message;
1753
1770
  },
1754
1771
  };
@@ -1789,6 +1806,114 @@ export const FollowEvent = {
1789
1806
  return message;
1790
1807
  },
1791
1808
  };
1809
+ function createBaseBannedUserEvent() {
1810
+ return { user_ids: [], action: 0, banner_id: "", channel_id: "", clan_id: "" };
1811
+ }
1812
+ export const BannedUserEvent = {
1813
+ encode(message, writer = _m0.Writer.create()) {
1814
+ for (const v of message.user_ids) {
1815
+ writer.uint32(10).string(v);
1816
+ }
1817
+ if (message.action !== 0) {
1818
+ writer.uint32(16).int32(message.action);
1819
+ }
1820
+ if (message.banner_id !== "") {
1821
+ writer.uint32(26).string(message.banner_id);
1822
+ }
1823
+ if (message.channel_id !== "") {
1824
+ writer.uint32(34).string(message.channel_id);
1825
+ }
1826
+ if (message.clan_id !== "") {
1827
+ writer.uint32(42).string(message.clan_id);
1828
+ }
1829
+ return writer;
1830
+ },
1831
+ decode(input, length) {
1832
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
1833
+ let end = length === undefined ? reader.len : reader.pos + length;
1834
+ const message = createBaseBannedUserEvent();
1835
+ while (reader.pos < end) {
1836
+ const tag = reader.uint32();
1837
+ switch (tag >>> 3) {
1838
+ case 1:
1839
+ if (tag !== 10) {
1840
+ break;
1841
+ }
1842
+ message.user_ids.push(reader.string());
1843
+ continue;
1844
+ case 2:
1845
+ if (tag !== 16) {
1846
+ break;
1847
+ }
1848
+ message.action = reader.int32();
1849
+ continue;
1850
+ case 3:
1851
+ if (tag !== 26) {
1852
+ break;
1853
+ }
1854
+ message.banner_id = reader.string();
1855
+ continue;
1856
+ case 4:
1857
+ if (tag !== 34) {
1858
+ break;
1859
+ }
1860
+ message.channel_id = reader.string();
1861
+ continue;
1862
+ case 5:
1863
+ if (tag !== 42) {
1864
+ break;
1865
+ }
1866
+ message.clan_id = reader.string();
1867
+ continue;
1868
+ }
1869
+ if ((tag & 7) === 4 || tag === 0) {
1870
+ break;
1871
+ }
1872
+ reader.skipType(tag & 7);
1873
+ }
1874
+ return message;
1875
+ },
1876
+ fromJSON(object) {
1877
+ return {
1878
+ user_ids: globalThis.Array.isArray(object?.user_ids) ? object.user_ids.map((e) => globalThis.String(e)) : [],
1879
+ action: isSet(object.action) ? globalThis.Number(object.action) : 0,
1880
+ banner_id: isSet(object.banner_id) ? globalThis.String(object.banner_id) : "",
1881
+ channel_id: isSet(object.channel_id) ? globalThis.String(object.channel_id) : "",
1882
+ clan_id: isSet(object.clan_id) ? globalThis.String(object.clan_id) : "",
1883
+ };
1884
+ },
1885
+ toJSON(message) {
1886
+ const obj = {};
1887
+ if (message.user_ids?.length) {
1888
+ obj.user_ids = message.user_ids;
1889
+ }
1890
+ if (message.action !== 0) {
1891
+ obj.action = Math.round(message.action);
1892
+ }
1893
+ if (message.banner_id !== "") {
1894
+ obj.banner_id = message.banner_id;
1895
+ }
1896
+ if (message.channel_id !== "") {
1897
+ obj.channel_id = message.channel_id;
1898
+ }
1899
+ if (message.clan_id !== "") {
1900
+ obj.clan_id = message.clan_id;
1901
+ }
1902
+ return obj;
1903
+ },
1904
+ create(base) {
1905
+ return BannedUserEvent.fromPartial(base ?? {});
1906
+ },
1907
+ fromPartial(object) {
1908
+ const message = createBaseBannedUserEvent();
1909
+ message.user_ids = object.user_ids?.map((e) => e) || [];
1910
+ message.action = object.action ?? 0;
1911
+ message.banner_id = object.banner_id ?? "";
1912
+ message.channel_id = object.channel_id ?? "";
1913
+ message.clan_id = object.clan_id ?? "";
1914
+ return message;
1915
+ },
1916
+ };
1792
1917
  function createBaseChannelCanvas() {
1793
1918
  return {
1794
1919
  id: "",
@@ -3854,6 +3979,7 @@ function createBaseChannelMessageSend() {
3854
3979
  is_public: false,
3855
3980
  code: 0,
3856
3981
  topic_id: "",
3982
+ id: "",
3857
3983
  };
3858
3984
  }
3859
3985
  export const ChannelMessageSend = {
@@ -3897,6 +4023,9 @@ export const ChannelMessageSend = {
3897
4023
  if (message.topic_id !== "") {
3898
4024
  writer.uint32(106).string(message.topic_id);
3899
4025
  }
4026
+ if (message.id !== "") {
4027
+ writer.uint32(114).string(message.id);
4028
+ }
3900
4029
  return writer;
3901
4030
  },
3902
4031
  decode(input, length) {
@@ -3984,6 +4113,12 @@ export const ChannelMessageSend = {
3984
4113
  }
3985
4114
  message.topic_id = reader.string();
3986
4115
  continue;
4116
+ case 14:
4117
+ if (tag !== 114) {
4118
+ break;
4119
+ }
4120
+ message.id = reader.string();
4121
+ continue;
3987
4122
  }
3988
4123
  if ((tag & 7) === 4 || tag === 0) {
3989
4124
  break;
@@ -4013,6 +4148,7 @@ export const ChannelMessageSend = {
4013
4148
  is_public: isSet(object.is_public) ? globalThis.Boolean(object.is_public) : false,
4014
4149
  code: isSet(object.code) ? globalThis.Number(object.code) : 0,
4015
4150
  topic_id: isSet(object.topic_id) ? globalThis.String(object.topic_id) : "",
4151
+ id: isSet(object.id) ? globalThis.String(object.id) : "",
4016
4152
  };
4017
4153
  },
4018
4154
  toJSON(message) {
@@ -4056,6 +4192,9 @@ export const ChannelMessageSend = {
4056
4192
  if (message.topic_id !== "") {
4057
4193
  obj.topic_id = message.topic_id;
4058
4194
  }
4195
+ if (message.id !== "") {
4196
+ obj.id = message.id;
4197
+ }
4059
4198
  return obj;
4060
4199
  },
4061
4200
  create(base) {
@@ -4076,6 +4215,7 @@ export const ChannelMessageSend = {
4076
4215
  message.is_public = object.is_public ?? false;
4077
4216
  message.code = object.code ?? 0;
4078
4217
  message.topic_id = object.topic_id ?? "";
4218
+ message.id = object.id ?? "";
4079
4219
  return message;
4080
4220
  },
4081
4221
  };
@@ -5012,13 +5152,28 @@ export const BlockFriend = {
5012
5152
  },
5013
5153
  };
5014
5154
  function createBaseUnblockFriend() {
5015
- return { user_id: "" };
5155
+ return { user_id: "", username: "", avatar: "", display_name: "", status: "", user_status: "" };
5016
5156
  }
5017
5157
  export const UnblockFriend = {
5018
5158
  encode(message, writer = _m0.Writer.create()) {
5019
5159
  if (message.user_id !== "") {
5020
5160
  writer.uint32(10).string(message.user_id);
5021
5161
  }
5162
+ if (message.username !== "") {
5163
+ writer.uint32(18).string(message.username);
5164
+ }
5165
+ if (message.avatar !== "") {
5166
+ writer.uint32(26).string(message.avatar);
5167
+ }
5168
+ if (message.display_name !== "") {
5169
+ writer.uint32(34).string(message.display_name);
5170
+ }
5171
+ if (message.status !== "") {
5172
+ writer.uint32(42).string(message.status);
5173
+ }
5174
+ if (message.user_status !== "") {
5175
+ writer.uint32(50).string(message.user_status);
5176
+ }
5022
5177
  return writer;
5023
5178
  },
5024
5179
  decode(input, length) {
@@ -5034,6 +5189,36 @@ export const UnblockFriend = {
5034
5189
  }
5035
5190
  message.user_id = reader.string();
5036
5191
  continue;
5192
+ case 2:
5193
+ if (tag !== 18) {
5194
+ break;
5195
+ }
5196
+ message.username = reader.string();
5197
+ continue;
5198
+ case 3:
5199
+ if (tag !== 26) {
5200
+ break;
5201
+ }
5202
+ message.avatar = reader.string();
5203
+ continue;
5204
+ case 4:
5205
+ if (tag !== 34) {
5206
+ break;
5207
+ }
5208
+ message.display_name = reader.string();
5209
+ continue;
5210
+ case 5:
5211
+ if (tag !== 42) {
5212
+ break;
5213
+ }
5214
+ message.status = reader.string();
5215
+ continue;
5216
+ case 6:
5217
+ if (tag !== 50) {
5218
+ break;
5219
+ }
5220
+ message.user_status = reader.string();
5221
+ continue;
5037
5222
  }
5038
5223
  if ((tag & 7) === 4 || tag === 0) {
5039
5224
  break;
@@ -5043,13 +5228,35 @@ export const UnblockFriend = {
5043
5228
  return message;
5044
5229
  },
5045
5230
  fromJSON(object) {
5046
- return { user_id: isSet(object.user_id) ? globalThis.String(object.user_id) : "" };
5231
+ return {
5232
+ user_id: isSet(object.user_id) ? globalThis.String(object.user_id) : "",
5233
+ username: isSet(object.username) ? globalThis.String(object.username) : "",
5234
+ avatar: isSet(object.avatar) ? globalThis.String(object.avatar) : "",
5235
+ display_name: isSet(object.display_name) ? globalThis.String(object.display_name) : "",
5236
+ status: isSet(object.status) ? globalThis.String(object.status) : "",
5237
+ user_status: isSet(object.user_status) ? globalThis.String(object.user_status) : "",
5238
+ };
5047
5239
  },
5048
5240
  toJSON(message) {
5049
5241
  const obj = {};
5050
5242
  if (message.user_id !== "") {
5051
5243
  obj.user_id = message.user_id;
5052
5244
  }
5245
+ if (message.username !== "") {
5246
+ obj.username = message.username;
5247
+ }
5248
+ if (message.avatar !== "") {
5249
+ obj.avatar = message.avatar;
5250
+ }
5251
+ if (message.display_name !== "") {
5252
+ obj.display_name = message.display_name;
5253
+ }
5254
+ if (message.status !== "") {
5255
+ obj.status = message.status;
5256
+ }
5257
+ if (message.user_status !== "") {
5258
+ obj.user_status = message.user_status;
5259
+ }
5053
5260
  return obj;
5054
5261
  },
5055
5262
  create(base) {
@@ -5058,6 +5265,11 @@ export const UnblockFriend = {
5058
5265
  fromPartial(object) {
5059
5266
  const message = createBaseUnblockFriend();
5060
5267
  message.user_id = object.user_id ?? "";
5268
+ message.username = object.username ?? "";
5269
+ message.avatar = object.avatar ?? "";
5270
+ message.display_name = object.display_name ?? "";
5271
+ message.status = object.status ?? "";
5272
+ message.user_status = object.user_status ?? "";
5061
5273
  return message;
5062
5274
  },
5063
5275
  };
@@ -6681,6 +6893,7 @@ function createBaseChannelCreatedEvent() {
6681
6893
  status: 0,
6682
6894
  app_id: "",
6683
6895
  clan_name: "",
6896
+ channel_avatar: "",
6684
6897
  };
6685
6898
  }
6686
6899
  export const ChannelCreatedEvent = {
@@ -6718,6 +6931,9 @@ export const ChannelCreatedEvent = {
6718
6931
  if (message.clan_name !== "") {
6719
6932
  writer.uint32(90).string(message.clan_name);
6720
6933
  }
6934
+ if (message.channel_avatar !== "") {
6935
+ writer.uint32(98).string(message.channel_avatar);
6936
+ }
6721
6937
  return writer;
6722
6938
  },
6723
6939
  decode(input, length) {
@@ -6793,6 +7009,12 @@ export const ChannelCreatedEvent = {
6793
7009
  }
6794
7010
  message.clan_name = reader.string();
6795
7011
  continue;
7012
+ case 12:
7013
+ if (tag !== 98) {
7014
+ break;
7015
+ }
7016
+ message.channel_avatar = reader.string();
7017
+ continue;
6796
7018
  }
6797
7019
  if ((tag & 7) === 4 || tag === 0) {
6798
7020
  break;
@@ -6814,6 +7036,7 @@ export const ChannelCreatedEvent = {
6814
7036
  status: isSet(object.status) ? globalThis.Number(object.status) : 0,
6815
7037
  app_id: isSet(object.app_id) ? globalThis.String(object.app_id) : "",
6816
7038
  clan_name: isSet(object.clan_name) ? globalThis.String(object.clan_name) : "",
7039
+ channel_avatar: isSet(object.channel_avatar) ? globalThis.String(object.channel_avatar) : "",
6817
7040
  };
6818
7041
  },
6819
7042
  toJSON(message) {
@@ -6851,6 +7074,9 @@ export const ChannelCreatedEvent = {
6851
7074
  if (message.clan_name !== "") {
6852
7075
  obj.clan_name = message.clan_name;
6853
7076
  }
7077
+ if (message.channel_avatar !== "") {
7078
+ obj.channel_avatar = message.channel_avatar;
7079
+ }
6854
7080
  return obj;
6855
7081
  },
6856
7082
  create(base) {
@@ -6869,6 +7095,7 @@ export const ChannelCreatedEvent = {
6869
7095
  message.status = object.status ?? 0;
6870
7096
  message.app_id = object.app_id ?? "";
6871
7097
  message.clan_name = object.clan_name ?? "";
7098
+ message.channel_avatar = object.channel_avatar ?? "";
6872
7099
  return message;
6873
7100
  },
6874
7101
  };
@@ -7632,6 +7859,7 @@ function createBaseChannelUpdatedEvent() {
7632
7859
  count_mess_unread: 0,
7633
7860
  user_ids: [],
7634
7861
  role_ids: [],
7862
+ channel_avatar: "",
7635
7863
  };
7636
7864
  }
7637
7865
  export const ChannelUpdatedEvent = {
@@ -7693,6 +7921,9 @@ export const ChannelUpdatedEvent = {
7693
7921
  for (const v of message.role_ids) {
7694
7922
  writer.uint32(154).string(v);
7695
7923
  }
7924
+ if (message.channel_avatar !== "") {
7925
+ writer.uint32(162).string(message.channel_avatar);
7926
+ }
7696
7927
  return writer;
7697
7928
  },
7698
7929
  decode(input, length) {
@@ -7816,6 +8047,12 @@ export const ChannelUpdatedEvent = {
7816
8047
  }
7817
8048
  message.role_ids.push(reader.string());
7818
8049
  continue;
8050
+ case 20:
8051
+ if (tag !== 162) {
8052
+ break;
8053
+ }
8054
+ message.channel_avatar = reader.string();
8055
+ continue;
7819
8056
  }
7820
8057
  if ((tag & 7) === 4 || tag === 0) {
7821
8058
  break;
@@ -7845,6 +8082,7 @@ export const ChannelUpdatedEvent = {
7845
8082
  count_mess_unread: isSet(object.count_mess_unread) ? globalThis.Number(object.count_mess_unread) : 0,
7846
8083
  user_ids: globalThis.Array.isArray(object?.user_ids) ? object.user_ids.map((e) => globalThis.String(e)) : [],
7847
8084
  role_ids: globalThis.Array.isArray(object?.role_ids) ? object.role_ids.map((e) => globalThis.String(e)) : [],
8085
+ channel_avatar: isSet(object.channel_avatar) ? globalThis.String(object.channel_avatar) : "",
7848
8086
  };
7849
8087
  },
7850
8088
  toJSON(message) {
@@ -7906,6 +8144,9 @@ export const ChannelUpdatedEvent = {
7906
8144
  if (message.role_ids?.length) {
7907
8145
  obj.role_ids = message.role_ids;
7908
8146
  }
8147
+ if (message.channel_avatar !== "") {
8148
+ obj.channel_avatar = message.channel_avatar;
8149
+ }
7909
8150
  return obj;
7910
8151
  },
7911
8152
  create(base) {
@@ -7932,6 +8173,7 @@ export const ChannelUpdatedEvent = {
7932
8173
  message.count_mess_unread = object.count_mess_unread ?? 0;
7933
8174
  message.user_ids = object.user_ids?.map((e) => e) || [];
7934
8175
  message.role_ids = object.role_ids?.map((e) => e) || [];
8176
+ message.channel_avatar = object.channel_avatar ?? "";
7935
8177
  return message;
7936
8178
  },
7937
8179
  };
@@ -8312,15 +8554,7 @@ export const StreamPresenceEvent = {
8312
8554
  },
8313
8555
  };
8314
8556
  function createBaseUserPresence() {
8315
- return {
8316
- user_id: "",
8317
- session_id: "",
8318
- username: "",
8319
- persistence: false,
8320
- status: undefined,
8321
- is_mobile: false,
8322
- user_status: "",
8323
- };
8557
+ return { user_id: "", session_id: "", username: "", status: undefined, is_mobile: false, user_status: "" };
8324
8558
  }
8325
8559
  export const UserPresence = {
8326
8560
  encode(message, writer = _m0.Writer.create()) {
@@ -8333,17 +8567,14 @@ export const UserPresence = {
8333
8567
  if (message.username !== "") {
8334
8568
  writer.uint32(26).string(message.username);
8335
8569
  }
8336
- if (message.persistence !== false) {
8337
- writer.uint32(32).bool(message.persistence);
8338
- }
8339
8570
  if (message.status !== undefined) {
8340
- StringValue.encode({ value: message.status }, writer.uint32(42).fork()).ldelim();
8571
+ StringValue.encode({ value: message.status }, writer.uint32(34).fork()).ldelim();
8341
8572
  }
8342
8573
  if (message.is_mobile !== false) {
8343
- writer.uint32(48).bool(message.is_mobile);
8574
+ writer.uint32(40).bool(message.is_mobile);
8344
8575
  }
8345
8576
  if (message.user_status !== "") {
8346
- writer.uint32(58).string(message.user_status);
8577
+ writer.uint32(50).string(message.user_status);
8347
8578
  }
8348
8579
  return writer;
8349
8580
  },
@@ -8373,25 +8604,19 @@ export const UserPresence = {
8373
8604
  message.username = reader.string();
8374
8605
  continue;
8375
8606
  case 4:
8376
- if (tag !== 32) {
8377
- break;
8378
- }
8379
- message.persistence = reader.bool();
8380
- continue;
8381
- case 5:
8382
- if (tag !== 42) {
8607
+ if (tag !== 34) {
8383
8608
  break;
8384
8609
  }
8385
8610
  message.status = StringValue.decode(reader, reader.uint32()).value;
8386
8611
  continue;
8387
- case 6:
8388
- if (tag !== 48) {
8612
+ case 5:
8613
+ if (tag !== 40) {
8389
8614
  break;
8390
8615
  }
8391
8616
  message.is_mobile = reader.bool();
8392
8617
  continue;
8393
- case 7:
8394
- if (tag !== 58) {
8618
+ case 6:
8619
+ if (tag !== 50) {
8395
8620
  break;
8396
8621
  }
8397
8622
  message.user_status = reader.string();
@@ -8409,7 +8634,6 @@ export const UserPresence = {
8409
8634
  user_id: isSet(object.user_id) ? globalThis.String(object.user_id) : "",
8410
8635
  session_id: isSet(object.session_id) ? globalThis.String(object.session_id) : "",
8411
8636
  username: isSet(object.username) ? globalThis.String(object.username) : "",
8412
- persistence: isSet(object.persistence) ? globalThis.Boolean(object.persistence) : false,
8413
8637
  status: isSet(object.status) ? String(object.status) : undefined,
8414
8638
  is_mobile: isSet(object.is_mobile) ? globalThis.Boolean(object.is_mobile) : false,
8415
8639
  user_status: isSet(object.user_status) ? globalThis.String(object.user_status) : "",
@@ -8426,9 +8650,6 @@ export const UserPresence = {
8426
8650
  if (message.username !== "") {
8427
8651
  obj.username = message.username;
8428
8652
  }
8429
- if (message.persistence !== false) {
8430
- obj.persistence = message.persistence;
8431
- }
8432
8653
  if (message.status !== undefined) {
8433
8654
  obj.status = message.status;
8434
8655
  }
@@ -8448,7 +8669,6 @@ export const UserPresence = {
8448
8669
  message.user_id = object.user_id ?? "";
8449
8670
  message.session_id = object.session_id ?? "";
8450
8671
  message.username = object.username ?? "";
8451
- message.persistence = object.persistence ?? false;
8452
8672
  message.status = object.status ?? undefined;
8453
8673
  message.is_mobile = object.is_mobile ?? false;
8454
8674
  message.user_status = object.user_status ?? "";