quickblox-react-ui-kit 0.5.1-join-dialog-off.5 → 0.5.2-alpha.1

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 (182) hide show
  1. package/.claude/settings.local.json +14 -0
  2. package/dist/CommonTypes/BaseViewModel.d.ts +0 -2
  3. package/dist/CommonTypes/BaseViewModel.d.ts.map +1 -1
  4. package/dist/Data/mapper/DialogLocalDTOMapper.d.ts.map +1 -1
  5. package/dist/Data/mapper/DialogRemoteDTOMapper.d.ts.map +1 -1
  6. package/dist/Data/repository/ConnectionRepository.d.ts.map +1 -1
  7. package/dist/Data/repository/DialogsRepository.d.ts +0 -4
  8. package/dist/Data/repository/DialogsRepository.d.ts.map +1 -1
  9. package/dist/Data/source/remote/IRemoteDataSource.d.ts +0 -4
  10. package/dist/Data/source/remote/IRemoteDataSource.d.ts.map +1 -1
  11. package/dist/Data/source/remote/Mapper/MessageDTOMapper.d.ts +1 -0
  12. package/dist/Data/source/remote/Mapper/MessageDTOMapper.d.ts.map +1 -1
  13. package/dist/Data/source/remote/RemoteDataSource.d.ts +0 -4
  14. package/dist/Data/source/remote/RemoteDataSource.d.ts.map +1 -1
  15. package/dist/Domain/entity/ChatMessageAttachmentEntity.d.ts +2 -2
  16. package/dist/Domain/entity/ChatMessageAttachmentEntity.d.ts.map +1 -1
  17. package/dist/Domain/entity/FileEntity.d.ts +2 -2
  18. package/dist/Domain/entity/FileEntity.d.ts.map +1 -1
  19. package/dist/Domain/entity/GroupDialogEntity.d.ts +1 -1
  20. package/dist/Domain/entity/GroupDialogEntity.d.ts.map +1 -1
  21. package/dist/Domain/repository/IDialogsRepository.d.ts +0 -4
  22. package/dist/Domain/repository/IDialogsRepository.d.ts.map +1 -1
  23. package/dist/Domain/use_cases/SyncDialogsUseCase.d.ts.map +1 -1
  24. package/dist/Domain/use_cases/UserTypingMessageUseCase.d.ts.map +1 -1
  25. package/dist/Presentation/Views/Dialog/Message/MessageAttachment/AudioAttachment/AudioAttachment.d.ts.map +1 -1
  26. package/dist/Presentation/Views/DialogInfo/DialogInfo.d.ts.map +1 -1
  27. package/dist/Presentation/Views/DialogList/DialogListViewModel.d.ts +1 -5
  28. package/dist/Presentation/Views/DialogList/DialogListViewModel.d.ts.map +1 -1
  29. package/dist/Presentation/Views/DialogList/useDialogListViewModel.d.ts.map +1 -1
  30. package/dist/Presentation/Views/EditDialog/EditDialog.d.ts +0 -5
  31. package/dist/Presentation/Views/EditDialog/EditDialog.d.ts.map +1 -1
  32. package/dist/Presentation/Views/Flow/CreateDialogFlow/CreateNewDialogFlow.d.ts.map +1 -1
  33. package/dist/Presentation/ui-components/MessageInput/VoiceRecordingProgress/VoiceRecordingProgress.d.ts.map +1 -1
  34. package/dist/index-ui.js +43513 -59614
  35. package/dist/qb-api-calls/index.d.ts +0 -1
  36. package/dist/qb-api-calls/index.d.ts.map +1 -1
  37. package/package.json +14 -8
  38. package/src/CommonTypes/BaseViewModel.ts +0 -4
  39. package/src/Data/DefaultConfigurations.ts +4 -4
  40. package/src/Data/mapper/DialogLocalDTOMapper.ts +9 -10
  41. package/src/Data/mapper/DialogRemoteDTOMapper.ts +9 -10
  42. package/src/Data/repository/ConnectionRepository.ts +3 -2
  43. package/src/Data/repository/DialogsRepository.ts +0 -85
  44. package/src/Data/source/remote/IRemoteDataSource.ts +0 -12
  45. package/src/Data/source/remote/Mapper/MessageDTOMapper.ts +39 -22
  46. package/src/Data/source/remote/RemoteDataSource.ts +65 -246
  47. package/src/Domain/entity/ChatMessageAttachmentEntity.ts +2 -2
  48. package/src/Domain/entity/FileEntity.ts +2 -2
  49. package/src/Domain/entity/GroupDialogEntity.ts +1 -1
  50. package/src/Domain/repository/IDialogsRepository.ts +0 -12
  51. package/src/Domain/use_cases/SyncDialogsUseCase.ts +3 -3
  52. package/src/Domain/use_cases/UserTypingMessageUseCase.ts +4 -2
  53. package/src/Presentation/Views/Dialog/Message/MessageAttachment/AudioAttachment/AudioAttachment.tsx +4 -9
  54. package/src/Presentation/Views/DialogInfo/DialogInfo.tsx +4 -39
  55. package/src/Presentation/Views/DialogList/DialogListViewModel.ts +1 -5
  56. package/src/Presentation/Views/DialogList/useDialogListViewModel.ts +0 -147
  57. package/src/Presentation/Views/EditDialog/EditDialog.scss +2 -21
  58. package/src/Presentation/Views/EditDialog/EditDialog.tsx +1 -47
  59. package/src/Presentation/Views/Flow/CreateDialogFlow/CreateNewDialogFlow.tsx +13 -49
  60. package/src/Presentation/layouts/Desktop/QuickBloxUIKitDesktopLayout.tsx +2 -2
  61. package/src/Presentation/ui-components/Message/Bubble/AttachmentBubble/AttachmentBubble.tsx +2 -2
  62. package/src/Presentation/ui-components/MessageInput/ReplyMessagePreview/ReplyImagePreviewAttachment/ReplyImagePreviewAttachment.tsx +2 -2
  63. package/src/Presentation/ui-components/MessageInput/VoiceRecordingProgress/VoiceRecordingProgress.tsx +24 -8
  64. package/src/QBconfig.ts +4 -4
  65. package/src/qb-api-calls/index.ts +2 -59
  66. package/storybook-static/161.77e7dbc5.iframe.bundle.js +2 -0
  67. package/storybook-static/217.cb8da73c.iframe.bundle.js +408 -0
  68. package/storybook-static/217.cb8da73c.iframe.bundle.js.map +1 -0
  69. package/storybook-static/263.f039edee.iframe.bundle.js +2 -0
  70. package/storybook-static/294.7ed84cb5.iframe.bundle.js +1 -0
  71. package/storybook-static/338.ed5286bb.iframe.bundle.js +2 -0
  72. package/storybook-static/363.fe646024.iframe.bundle.js +2 -0
  73. package/storybook-static/{363.64281ecc.iframe.bundle.js.LICENSE.txt → 363.fe646024.iframe.bundle.js.LICENSE.txt} +0 -7
  74. package/storybook-static/364.fb3fc9b4.iframe.bundle.js +1 -0
  75. package/storybook-static/488.a47f0de8.iframe.bundle.js +1 -0
  76. package/storybook-static/559.fdf11e08.iframe.bundle.js +2 -0
  77. package/storybook-static/618.ab5566c8.iframe.bundle.js +1 -0
  78. package/storybook-static/844.5804474b.iframe.bundle.js +95 -0
  79. package/storybook-static/844.5804474b.iframe.bundle.js.map +1 -0
  80. package/storybook-static/936.ba75ae44.iframe.bundle.js +1 -0
  81. package/storybook-static/Presentation-ui-components-Avatar-avatar-stories.6977856e.iframe.bundle.js +2 -0
  82. package/storybook-static/Presentation-ui-components-Badge-Badge-stories.d77c6500.iframe.bundle.js +2 -0
  83. package/storybook-static/Presentation-ui-components-Button-Button-stories.05f2f5b7.iframe.bundle.js +2 -0
  84. package/storybook-static/Presentation-ui-components-DialogBanner-DialogBanner-stories.118df514.iframe.bundle.js +1 -0
  85. package/storybook-static/Presentation-ui-components-DialogItemPreview-DialogItemPreview-stories.e9d3dc6b.iframe.bundle.js +2 -0
  86. package/storybook-static/Presentation-ui-components-DialogWindow-DialogWindow-stories.7d74bffa.iframe.bundle.js +2 -0
  87. package/storybook-static/Presentation-ui-components-Dropdown-Dropdown-stories.d92e6904.iframe.bundle.js +2 -0
  88. package/storybook-static/Presentation-ui-components-Header-Header-stories.b9a00187.iframe.bundle.js +2 -0
  89. package/storybook-static/Presentation-ui-components-Loader-Loader-stories.f484b131.iframe.bundle.js +2 -0
  90. package/storybook-static/Presentation-ui-components-Message-Message-stories.66867b7e.iframe.bundle.js +2 -0
  91. package/storybook-static/Presentation-ui-components-MessageInput-MessageInput-stories.d72f098b.iframe.bundle.js +1 -0
  92. package/storybook-static/Presentation-ui-components-MessageSeparator-MessageSeparator-stories.7d9e0991.iframe.bundle.js +1 -0
  93. package/storybook-static/Presentation-ui-components-Placeholder-Placeholder-stories.1e6bd1cd.iframe.bundle.js +2 -0
  94. package/storybook-static/Presentation-ui-components-PreviewFileMessage-PreviewFileMessage-stories.44c68c03.iframe.bundle.js +2 -0
  95. package/storybook-static/Presentation-ui-components-SettingsItem-SettingsItem-stories.3e87329b.iframe.bundle.js +2 -0
  96. package/storybook-static/Presentation-ui-components-TextField-TextField-stories.ec3e7d5f.iframe.bundle.js +2 -0
  97. package/storybook-static/Presentation-ui-components-Toast-Toast-stories.2721621c.iframe.bundle.js +1 -0
  98. package/storybook-static/Presentation-ui-components-UserListItem-UserListItem-stories.33b23eab.iframe.bundle.js +2 -0
  99. package/storybook-static/docs-Introduction-mdx.416f8bf9.iframe.bundle.js +1 -0
  100. package/storybook-static/docs-Styling-mdx.c119b271.iframe.bundle.js +1 -0
  101. package/storybook-static/iframe.html +5 -3
  102. package/storybook-static/main.bfaba8e3.iframe.bundle.js +1 -0
  103. package/storybook-static/project.json +1 -1
  104. package/storybook-static/runtime~main.b1ec3380.iframe.bundle.js +1 -0
  105. package/storybook-static/sb-addons/chromatic-com-storybook-10/manager-bundle.js +27 -27
  106. package/storybook-static/sb-addons/essentials-actions-3/manager-bundle.js +1 -1
  107. package/storybook-static/sb-addons/essentials-backgrounds-5/manager-bundle.js +1 -1
  108. package/storybook-static/sb-addons/essentials-controls-2/manager-bundle.js +74 -71
  109. package/storybook-static/sb-addons/essentials-docs-4/manager-bundle.js +73 -70
  110. package/storybook-static/sb-addons/essentials-viewport-6/manager-bundle.js +1 -1
  111. package/storybook-static/sb-addons/interactions-11/manager-bundle.js +6 -6
  112. package/storybook-static/sb-addons/onboarding-1/manager-bundle.js +18 -18
  113. package/storybook-static/sb-manager/globals-runtime.js +10691 -11043
  114. package/storybook-static/sb-preview/runtime.js +238 -238
  115. package/dist/Domain/use_cases/CreateDialogSetUpAutoJoinUseCase.d.ts +0 -14
  116. package/dist/Domain/use_cases/CreateDialogSetUpAutoJoinUseCase.d.ts.map +0 -1
  117. package/dist/Domain/use_cases/CreateDialogWithAutoJoinUseCase.d.ts +0 -14
  118. package/dist/Domain/use_cases/CreateDialogWithAutoJoinUseCase.d.ts.map +0 -1
  119. package/dist/Domain/use_cases/JoinFromTheDialogUseCase.d.ts +0 -12
  120. package/dist/Domain/use_cases/JoinFromTheDialogUseCase.d.ts.map +0 -1
  121. package/dist/Domain/use_cases/UnJoinFromTheDialogUseCase.d.ts +0 -12
  122. package/dist/Domain/use_cases/UnJoinFromTheDialogUseCase.d.ts.map +0 -1
  123. package/src/Domain/use_cases/CreateDialogSetUpAutoJoinUseCase.ts +0 -77
  124. package/src/Domain/use_cases/CreateDialogWithAutoJoinUseCase.ts +0 -77
  125. package/src/Domain/use_cases/JoinFromTheDialogUseCase.ts +0 -61
  126. package/src/Domain/use_cases/UnJoinFromTheDialogUseCase.ts +0 -61
  127. package/storybook-static/161.53da4e03.iframe.bundle.js +0 -2
  128. package/storybook-static/167.88fc69a9.iframe.bundle.js +0 -1
  129. package/storybook-static/217.bd248edb.iframe.bundle.js +0 -405
  130. package/storybook-static/217.bd248edb.iframe.bundle.js.map +0 -1
  131. package/storybook-static/294.b81cdbca.iframe.bundle.js +0 -1
  132. package/storybook-static/363.64281ecc.iframe.bundle.js +0 -2
  133. package/storybook-static/364.988cd801.iframe.bundle.js +0 -1
  134. package/storybook-static/488.3cd3942e.iframe.bundle.js +0 -1
  135. package/storybook-static/559.9e64a6f5.iframe.bundle.js +0 -2
  136. package/storybook-static/735.3121b1b2.iframe.bundle.js +0 -2
  137. package/storybook-static/844.815b57b5.iframe.bundle.js +0 -95
  138. package/storybook-static/844.815b57b5.iframe.bundle.js.map +0 -1
  139. package/storybook-static/936.8546c1d8.iframe.bundle.js +0 -1
  140. package/storybook-static/961.d47fc2bc.iframe.bundle.js +0 -2
  141. package/storybook-static/Presentation-ui-components-Avatar-avatar-stories.a1656796.iframe.bundle.js +0 -2
  142. package/storybook-static/Presentation-ui-components-Badge-Badge-stories.58880259.iframe.bundle.js +0 -2
  143. package/storybook-static/Presentation-ui-components-Button-Button-stories.f456d20f.iframe.bundle.js +0 -2
  144. package/storybook-static/Presentation-ui-components-DialogBanner-DialogBanner-stories.cd797979.iframe.bundle.js +0 -1
  145. package/storybook-static/Presentation-ui-components-DialogItemPreview-DialogItemPreview-stories.2dae7689.iframe.bundle.js +0 -2
  146. package/storybook-static/Presentation-ui-components-DialogWindow-DialogWindow-stories.cd0c68a8.iframe.bundle.js +0 -2
  147. package/storybook-static/Presentation-ui-components-Dropdown-Dropdown-stories.c88a1bf9.iframe.bundle.js +0 -2
  148. package/storybook-static/Presentation-ui-components-Header-Header-stories.dd4b2b7b.iframe.bundle.js +0 -2
  149. package/storybook-static/Presentation-ui-components-Loader-Loader-stories.500e777d.iframe.bundle.js +0 -2
  150. package/storybook-static/Presentation-ui-components-Message-Message-stories.93af3d2d.iframe.bundle.js +0 -2
  151. package/storybook-static/Presentation-ui-components-MessageInput-MessageInput-stories.d1c68a8a.iframe.bundle.js +0 -1
  152. package/storybook-static/Presentation-ui-components-MessageSeparator-MessageSeparator-stories.2b4362f7.iframe.bundle.js +0 -1
  153. package/storybook-static/Presentation-ui-components-Placeholder-Placeholder-stories.34dfadb1.iframe.bundle.js +0 -2
  154. package/storybook-static/Presentation-ui-components-PreviewFileMessage-PreviewFileMessage-stories.9b4eff15.iframe.bundle.js +0 -2
  155. package/storybook-static/Presentation-ui-components-SettingsItem-SettingsItem-stories.8574dbe1.iframe.bundle.js +0 -2
  156. package/storybook-static/Presentation-ui-components-TextField-TextField-stories.058998bf.iframe.bundle.js +0 -2
  157. package/storybook-static/Presentation-ui-components-Toast-Toast-stories.c4dfb1a6.iframe.bundle.js +0 -1
  158. package/storybook-static/Presentation-ui-components-UserListItem-UserListItem-stories.371bcb5d.iframe.bundle.js +0 -2
  159. package/storybook-static/docs-Introduction-mdx.5addfa61.iframe.bundle.js +0 -1
  160. package/storybook-static/docs-Styling-mdx.9f4235f1.iframe.bundle.js +0 -1
  161. package/storybook-static/main.d176ed27.iframe.bundle.js +0 -1
  162. package/storybook-static/runtime~main.bc0704e8.iframe.bundle.js +0 -1
  163. /package/storybook-static/{161.53da4e03.iframe.bundle.js.LICENSE.txt → 161.77e7dbc5.iframe.bundle.js.LICENSE.txt} +0 -0
  164. /package/storybook-static/{217.bd248edb.iframe.bundle.js.LICENSE.txt → 217.cb8da73c.iframe.bundle.js.LICENSE.txt} +0 -0
  165. /package/storybook-static/{961.d47fc2bc.iframe.bundle.js.LICENSE.txt → 263.f039edee.iframe.bundle.js.LICENSE.txt} +0 -0
  166. /package/storybook-static/{735.3121b1b2.iframe.bundle.js.LICENSE.txt → 338.ed5286bb.iframe.bundle.js.LICENSE.txt} +0 -0
  167. /package/storybook-static/{559.9e64a6f5.iframe.bundle.js.LICENSE.txt → 559.fdf11e08.iframe.bundle.js.LICENSE.txt} +0 -0
  168. /package/storybook-static/{844.815b57b5.iframe.bundle.js.LICENSE.txt → 844.5804474b.iframe.bundle.js.LICENSE.txt} +0 -0
  169. /package/storybook-static/{Presentation-ui-components-Avatar-avatar-stories.a1656796.iframe.bundle.js.LICENSE.txt → Presentation-ui-components-Avatar-avatar-stories.6977856e.iframe.bundle.js.LICENSE.txt} +0 -0
  170. /package/storybook-static/{Presentation-ui-components-Badge-Badge-stories.58880259.iframe.bundle.js.LICENSE.txt → Presentation-ui-components-Badge-Badge-stories.d77c6500.iframe.bundle.js.LICENSE.txt} +0 -0
  171. /package/storybook-static/{Presentation-ui-components-Button-Button-stories.f456d20f.iframe.bundle.js.LICENSE.txt → Presentation-ui-components-Button-Button-stories.05f2f5b7.iframe.bundle.js.LICENSE.txt} +0 -0
  172. /package/storybook-static/{Presentation-ui-components-DialogItemPreview-DialogItemPreview-stories.2dae7689.iframe.bundle.js.LICENSE.txt → Presentation-ui-components-DialogItemPreview-DialogItemPreview-stories.e9d3dc6b.iframe.bundle.js.LICENSE.txt} +0 -0
  173. /package/storybook-static/{Presentation-ui-components-DialogWindow-DialogWindow-stories.cd0c68a8.iframe.bundle.js.LICENSE.txt → Presentation-ui-components-DialogWindow-DialogWindow-stories.7d74bffa.iframe.bundle.js.LICENSE.txt} +0 -0
  174. /package/storybook-static/{Presentation-ui-components-Dropdown-Dropdown-stories.c88a1bf9.iframe.bundle.js.LICENSE.txt → Presentation-ui-components-Dropdown-Dropdown-stories.d92e6904.iframe.bundle.js.LICENSE.txt} +0 -0
  175. /package/storybook-static/{Presentation-ui-components-Header-Header-stories.dd4b2b7b.iframe.bundle.js.LICENSE.txt → Presentation-ui-components-Header-Header-stories.b9a00187.iframe.bundle.js.LICENSE.txt} +0 -0
  176. /package/storybook-static/{Presentation-ui-components-Loader-Loader-stories.500e777d.iframe.bundle.js.LICENSE.txt → Presentation-ui-components-Loader-Loader-stories.f484b131.iframe.bundle.js.LICENSE.txt} +0 -0
  177. /package/storybook-static/{Presentation-ui-components-Message-Message-stories.93af3d2d.iframe.bundle.js.LICENSE.txt → Presentation-ui-components-Message-Message-stories.66867b7e.iframe.bundle.js.LICENSE.txt} +0 -0
  178. /package/storybook-static/{Presentation-ui-components-Placeholder-Placeholder-stories.34dfadb1.iframe.bundle.js.LICENSE.txt → Presentation-ui-components-Placeholder-Placeholder-stories.1e6bd1cd.iframe.bundle.js.LICENSE.txt} +0 -0
  179. /package/storybook-static/{Presentation-ui-components-PreviewFileMessage-PreviewFileMessage-stories.9b4eff15.iframe.bundle.js.LICENSE.txt → Presentation-ui-components-PreviewFileMessage-PreviewFileMessage-stories.44c68c03.iframe.bundle.js.LICENSE.txt} +0 -0
  180. /package/storybook-static/{Presentation-ui-components-SettingsItem-SettingsItem-stories.8574dbe1.iframe.bundle.js.LICENSE.txt → Presentation-ui-components-SettingsItem-SettingsItem-stories.3e87329b.iframe.bundle.js.LICENSE.txt} +0 -0
  181. /package/storybook-static/{Presentation-ui-components-TextField-TextField-stories.058998bf.iframe.bundle.js.LICENSE.txt → Presentation-ui-components-TextField-TextField-stories.ec3e7d5f.iframe.bundle.js.LICENSE.txt} +0 -0
  182. /package/storybook-static/{Presentation-ui-components-UserListItem-UserListItem-stories.371bcb5d.iframe.bundle.js.LICENSE.txt → Presentation-ui-components-UserListItem-UserListItem-stories.33b23eab.iframe.bundle.js.LICENSE.txt} +0 -0
@@ -64,9 +64,6 @@ import {
64
64
  QBUsersGetById,
65
65
  setQB,
66
66
  getQB,
67
- QBCreateGroupDialogWithAutojoinFalse,
68
- QBLeaveDialog,
69
- QBCreateGroupDialogWithAutojoinTrue,
70
67
  } from '../../../qb-api-calls';
71
68
  import { UserDTOMapper } from './Mapper/UserDTOMapper';
72
69
  import { MessageDTOMapper } from './Mapper/MessageDTOMapper';
@@ -187,9 +184,7 @@ export class RemoteDataSource implements IRemoteDataSource {
187
184
  let hasMoreUsers = true;
188
185
 
189
186
  while (hasMoreUsers) {
190
- const { ResultData, PaginationResult } = await this.getAllUsers(
191
- pagination,
192
- );
187
+ const { ResultData, PaginationResult } = await this.getAllUsers(pagination);
193
188
 
194
189
  for (const user of ResultData) {
195
190
  if (!this.userCache.has(user.id)) {
@@ -197,18 +192,14 @@ export class RemoteDataSource implements IRemoteDataSource {
197
192
  }
198
193
  }
199
194
 
200
- if (
201
- PaginationResult.getCurrentPage() >= PaginationResult.totalPages
202
- ) {
195
+ if (PaginationResult.getCurrentPage() >= PaginationResult.totalPages) {
203
196
  hasMoreUsers = false;
204
197
  } else {
205
198
  pagination.setCurrentPage(pagination.getCurrentPage() + 1);
206
199
  }
207
200
  }
208
201
 
209
- console.log(
210
- `User cache preload complete. Loaded ${this.userCache.size} users.`,
211
- );
202
+ console.log(`User cache preload complete. Loaded ${this.userCache.size} users.`);
212
203
 
213
204
  clearInterval(this.userCachePreloadInterval!);
214
205
  this.userCachePreloadInterval = null;
@@ -899,30 +890,19 @@ export class RemoteDataSource implements IRemoteDataSource {
899
890
  //get dialogs flow
900
891
 
901
892
  private async joinGroupDialog(dialogId: string): Promise<void> {
902
- // try {
903
- // await QBJoinGroupDialog(dialogId).catch(() => {
904
- // this.joinStatusMap.set(dialogId, false);
905
- // throw new RemoteDataSourceException(
906
- // INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_MESSAGE,
907
- // INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_CODE,
908
- // );
909
- // });
910
- // this.joinStatusMap.set(dialogId, true);
911
- // } catch (reason) {
912
- // console.log(`QBJoinGroupDialog error for dialog ${dialogId}:`, reason);
913
- // this.joinStatusMap.set(dialogId, false);
914
- // }
915
- }
916
-
917
- public async joinDialog(dialogDto: RemoteDialogDTO): Promise<void> {
918
- const dialogId = dialogDto.id;
919
- await QBJoinGroupDialog(dialogId).catch(() => {
893
+ try {
894
+ await QBJoinGroupDialog(dialogId).catch(() => {
895
+ this.joinStatusMap.set(dialogId, false);
896
+ throw new RemoteDataSourceException(
897
+ INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_MESSAGE,
898
+ INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_CODE,
899
+ );
900
+ });
901
+ this.joinStatusMap.set(dialogId, true);
902
+ } catch (reason) {
903
+ console.log(`QBJoinGroupDialog error for dialog ${dialogId}:`, reason);
920
904
  this.joinStatusMap.set(dialogId, false);
921
- throw new RemoteDataSourceException(
922
- INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_MESSAGE,
923
- INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_CODE,
924
- );
925
- });
905
+ }
926
906
  }
927
907
 
928
908
  //version 0.5.0-beta.11,12,14
@@ -949,9 +929,7 @@ export class RemoteDataSource implements IRemoteDataSource {
949
929
  private async processDialogsInBackground(dialogIds: string[]): Promise<void> {
950
930
  const BATCH_SIZE = 12;
951
931
 
952
- console.log(
953
- `Starting background processing for ${dialogIds.length} dialogs`,
954
- );
932
+ console.log(`Starting background processing for ${dialogIds.length} dialogs`);
955
933
 
956
934
  for (let i = 0; i < dialogIds.length; i += BATCH_SIZE) {
957
935
  const batch = dialogIds.slice(i, i + BATCH_SIZE);
@@ -977,7 +955,7 @@ export class RemoteDataSource implements IRemoteDataSource {
977
955
  const pageNumber = currentPagination.getCurrentPage() || 1;
978
956
  const perPage = currentPagination.perPage || 100;
979
957
 
980
- const params: Dictionary<any> = {
958
+ const params: Dictionary<any> = {
981
959
  created_at: { lt: Date.now() / 1000 },
982
960
  sort_desc: 'updated_at',
983
961
  page: pageNumber,
@@ -997,36 +975,6 @@ export class RemoteDataSource implements IRemoteDataSource {
997
975
  const qbDialogs: QBGetDialogResult | undefined = await QBGetDialogs(params);
998
976
 
999
977
  if (qbDialogs) {
1000
- //LOGS
1001
- console.log('call getDialogs:');
1002
- console.log('Total dialogs:', qbDialogs.total_entries);
1003
- console.log('Dialogs:');
1004
- // @ts-ignore
1005
- qbDialogs.items.forEach((dialog) => {
1006
- console.log(`- ID: ${dialog._id}`);
1007
- console.log(` Name: ${dialog.name}`);
1008
- console.log(` Type: ${dialog.type}`);
1009
- console.log(` Occupants: ${dialog.occupants_ids.join(', ')}`);
1010
- console.log(` Last message: ${dialog.last_message || 'No message'}`);
1011
- console.log(` Unread messages: ${dialog.unread_messages_count ?? 0}`);
1012
- console.log(` is_join_required: ${dialog.is_join_required ?? 'N/A'}`);
1013
- console.log('--------------------');
1014
- });
1015
- console.log('Dialogs resume table:');
1016
- console.table(
1017
- // @ts-ignore
1018
- qbDialogs.items.map((d) => ({
1019
- ID: d._id,
1020
- Name: d.name,
1021
- Type: d.type,
1022
- Occupants: d.occupants_ids.length,
1023
- LastMessage: d.last_message,
1024
- Unread: d.unread_messages_count ?? 0,
1025
- is_join_required: d.is_join_required ?? 'N/A',
1026
- }))
1027
- );
1028
-
1029
- //
1030
978
  currentPagination = new Pagination(0, perPage);
1031
979
  currentPagination.totalPages = qbDialogs.total_entries / perPage;
1032
980
  currentPagination.setCurrentPage(pageNumber);
@@ -1035,13 +983,9 @@ export class RemoteDataSource implements IRemoteDataSource {
1035
983
  const qbEntity: QBChatDialog = item;
1036
984
  if (!qbEntity) continue;
1037
985
 
1038
- const newDTO: RemoteDialogDTO =
1039
- await this.getCurrentDialogDTOMapper().toTDO(qbEntity);
986
+ const newDTO: RemoteDialogDTO = await this.getCurrentDialogDTOMapper().toTDO(qbEntity);
1040
987
 
1041
- if (
1042
- newDTO.type === DialogType.group &&
1043
- !this.processedDialogs.has(newDTO.id)
1044
- ) {
988
+ if (newDTO.type === DialogType.group && !this.processedDialogs.has(newDTO.id)) {
1045
989
  this.processedDialogs.add(newDTO.id);
1046
990
 
1047
991
  if (!this.joinStatusMap.has(newDTO.id)) {
@@ -1061,8 +1005,6 @@ export class RemoteDataSource implements IRemoteDataSource {
1061
1005
  await this.processDialogsInBackground(remainingDialogs);
1062
1006
  this.startJoinRetryProcess();
1063
1007
  }
1064
- } else {
1065
- console.log('No dialogs retrieved');
1066
1008
  }
1067
1009
 
1068
1010
  return Promise.resolve(new RemoteDialogsDTO(dialogsDTO, currentPagination));
@@ -1308,104 +1250,6 @@ export class RemoteDataSource implements IRemoteDataSource {
1308
1250
  return Promise.resolve(newDTO);
1309
1251
  }
1310
1252
 
1311
- async createDialogWithAutojoin(
1312
- dto: RemoteDialogDTO,
1313
- ): Promise<RemoteDialogDTO> {
1314
- console.log(
1315
- 'call createDialogWithAutoJoin in remote with params: ',
1316
- JSON.stringify(dto),
1317
- );
1318
- const qbEntity: QBChatDialog =
1319
- await this.getCurrentDialogDTOMapper().fromDTO(dto);
1320
-
1321
- let qbDialog: QBChatDialog | undefined | null;
1322
-
1323
- if (qbEntity.type === DialogType.private) {
1324
- const participantId = qbEntity.occupants_ids[0];
1325
-
1326
- qbDialog = await QBCreatePrivateDialog(participantId, qbEntity.name);
1327
- } else if (qbEntity.type === DialogType.group) {
1328
- const participants = qbEntity.occupants_ids;
1329
-
1330
- const data = { photo: qbEntity.photo };
1331
-
1332
- qbDialog = await QBCreateGroupDialogWithAutojoinFalse(
1333
- participants,
1334
- qbEntity.name,
1335
- data,
1336
- );
1337
- }
1338
-
1339
- if (qbDialog === null || qbDialog === undefined) {
1340
- return Promise.reject(
1341
- new RemoteDataSourceException(
1342
- INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_MESSAGE,
1343
- INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_CODE,
1344
- ),
1345
- );
1346
- }
1347
-
1348
- const newDTO: RemoteDialogDTO =
1349
- await this.getCurrentDialogDTOMapper().toTDO(qbDialog);
1350
-
1351
- console.log(
1352
- 'have result in createDialog in remote ds: ',
1353
- JSON.stringify(newDTO),
1354
- );
1355
-
1356
- return Promise.resolve(newDTO);
1357
- }
1358
-
1359
-
1360
- async createDialogSetUpAutojoin(
1361
- dto: RemoteDialogDTO,
1362
- ): Promise<RemoteDialogDTO> {
1363
- console.log(
1364
- 'call createDialogSetUpAutojoin in remote with params: ',
1365
- JSON.stringify(dto),
1366
- );
1367
- const qbEntity: QBChatDialog =
1368
- await this.getCurrentDialogDTOMapper().fromDTO(dto);
1369
-
1370
- let qbDialog: QBChatDialog | undefined | null;
1371
-
1372
- if (qbEntity.type === DialogType.private) {
1373
- const participantId = qbEntity.occupants_ids[0];
1374
-
1375
- qbDialog = await QBCreatePrivateDialog(participantId, qbEntity.name);
1376
- } else if (qbEntity.type === DialogType.group) {
1377
- const participants = qbEntity.occupants_ids;
1378
-
1379
- const data = { photo: qbEntity.photo };
1380
-
1381
- qbDialog = await QBCreateGroupDialogWithAutojoinTrue(
1382
- participants,
1383
- qbEntity.name,
1384
- data,
1385
- );
1386
- }
1387
-
1388
- if (qbDialog === null || qbDialog === undefined) {
1389
- return Promise.reject(
1390
- new RemoteDataSourceException(
1391
- INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_MESSAGE,
1392
- INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_CODE,
1393
- ),
1394
- );
1395
- }
1396
-
1397
- const newDTO: RemoteDialogDTO =
1398
- await this.getCurrentDialogDTOMapper().toTDO(qbDialog);
1399
-
1400
- console.log(
1401
- 'have result in createDialog in remote ds: ',
1402
- JSON.stringify(newDTO),
1403
- );
1404
-
1405
- return Promise.resolve(newDTO);
1406
- }
1407
-
1408
-
1409
1253
  async updateDialog(dto: RemoteDialogDTO): Promise<RemoteDialogDTO> {
1410
1254
  const qbEntity: QBUIKitChatDialog =
1411
1255
  await this.getCurrentDialogDTOMapper().fromDTO(dto);
@@ -1526,24 +1370,6 @@ export class RemoteDataSource implements IRemoteDataSource {
1526
1370
  return Promise.resolve();
1527
1371
  }
1528
1372
 
1529
- async unjoinUsersFromDialog(dialogDTO: RemoteDialogDTO): Promise<void> {
1530
- const qbEntity: QBChatDialog =
1531
- await this.getCurrentDialogDTOMapper().fromDTO(dialogDTO);
1532
-
1533
- const qbResult = await QBLeaveDialog(qbEntity._id);
1534
-
1535
- if (qbResult === null || qbResult === undefined) {
1536
- return Promise.reject(
1537
- new RemoteDataSourceException(
1538
- INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_MESSAGE,
1539
- INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_CODE,
1540
- ),
1541
- );
1542
- }
1543
-
1544
- return Promise.resolve();
1545
- }
1546
-
1547
1373
  // async getUser(dto: RemoteUserDTO): Promise<RemoteUserDTO> {
1548
1374
  // const currentItem: QBUser | undefined = await QBUsersGetById(
1549
1375
  // parseInt(dto.id, 10),
@@ -1756,7 +1582,9 @@ export class RemoteDataSource implements IRemoteDataSource {
1756
1582
  ),
1757
1583
  );
1758
1584
  }
1759
- console.log(`GET MESSAGES ${qbMessages.items.length} FROM SERVER.`);
1585
+ console.log(
1586
+ `GET MESSAGES ${qbMessages.items.length} FROM SERVER.`,
1587
+ );
1760
1588
  const currentUserId = this._authInformation?.userId;
1761
1589
 
1762
1590
  await Promise.all(
@@ -1837,46 +1665,46 @@ export class RemoteDataSource implements IRemoteDataSource {
1837
1665
  //
1838
1666
  const messageText = dto.message;
1839
1667
 
1840
- const extension: Partial<QBUIKitChatNewMessage['extension']> = {
1841
- save_to_history: 1,
1842
- dialog_id: dto.dialogId,
1843
- };
1668
+ const extension: Partial<QBUIKitChatNewMessage['extension']> = {
1669
+ save_to_history: 1,
1670
+ dialog_id: dto.dialogId,
1671
+ };
1844
1672
 
1845
- if (dto.notification_type) {
1846
- extension.notification_type = dto.notification_type;
1847
- }
1673
+ if (dto.notification_type) {
1674
+ extension.notification_type = dto.notification_type;
1675
+ }
1848
1676
 
1849
- if (dto.sender_id || dto.recipient_id) {
1850
- extension.sender_id = dto.sender_id || dto.recipient_id;
1851
- }
1677
+ if (dto.sender_id || dto.recipient_id) {
1678
+ extension.sender_id = dto.sender_id || dto.recipient_id;
1679
+ }
1852
1680
 
1853
- if (dto.qb_message_action) {
1854
- extension.qb_message_action = dto.qb_message_action;
1855
- }
1681
+ if (dto.qb_message_action) {
1682
+ extension.qb_message_action = dto.qb_message_action;
1683
+ }
1856
1684
 
1857
- if (dto.origin_sender_name) {
1858
- extension.origin_sender_name = dto.origin_sender_name;
1859
- }
1685
+ if (dto.origin_sender_name) {
1686
+ extension.origin_sender_name = dto.origin_sender_name;
1687
+ }
1860
1688
 
1861
- const originalMessages = MessageDTOMapper.translateOriginalDataToJSON(
1862
- MessageDTOMapper.convertToQBChatNewMessage(
1863
- dto.qb_original_messages || [],
1864
- ) || [],
1865
- );
1689
+ const originalMessages = MessageDTOMapper.translateOriginalDataToJSON(
1690
+ MessageDTOMapper.convertToQBChatNewMessage(dto.qb_original_messages || []) || [],
1691
+ );
1866
1692
 
1867
- if (originalMessages && originalMessages.length > 0) {
1868
- extension.qb_original_messages = originalMessages;
1869
- }
1693
+ if (originalMessages && originalMessages.length > 0) {
1694
+ extension.qb_original_messages = originalMessages;
1695
+ }
1696
+
1697
+
1698
+ const qbEntity: QBUIKitChatNewMessage = {
1699
+ type: dto.dialog_type === DialogType.private ? 'chat' : 'groupchat',
1700
+ body: messageText || '',
1701
+ dialog_id: dto.dialogId,
1702
+ extension: extension as QBUIKitChatNewMessage['extension'],
1703
+ markable: 1,
1704
+ };
1870
1705
 
1871
- const qbEntity: QBUIKitChatNewMessage = {
1872
- type: dto.dialog_type === DialogType.private ? 'chat' : 'groupchat',
1873
- body: messageText || '',
1874
- dialog_id: dto.dialogId,
1875
- extension: extension as QBUIKitChatNewMessage['extension'],
1876
- markable: 1,
1877
- };
1878
1706
 
1879
- // const qbEntity: QBUIKitChatNewMessage = {
1707
+ // const qbEntity: QBUIKitChatNewMessage = {
1880
1708
  // type: dto.dialog_type === DialogType.private ? 'chat' : 'groupchat',
1881
1709
  // body: messageText || '',
1882
1710
  // notification_type: dto.notification_type,
@@ -1908,13 +1736,13 @@ export class RemoteDataSource implements IRemoteDataSource {
1908
1736
  // type: att.type.toString(),
1909
1737
  // uid: att.uid,
1910
1738
  // };
1911
- const chatMessageAttachment: ChatMessageAttachment = {
1912
- id: att.id?.toString(),
1913
- name: att.name?.toString(),
1914
- size: att.size?.toString(),
1915
- type: att.type?.toString(),
1916
- uid: att.uid?.toString(),
1917
- };
1739
+ const chatMessageAttachment: ChatMessageAttachment = {
1740
+ id: att.id?.toString(),
1741
+ name: att.name?.toString(),
1742
+ size: att.size?.toString(),
1743
+ type: att.type?.toString(),
1744
+ uid: att.uid?.toString(),
1745
+ };
1918
1746
 
1919
1747
  qbEntity.extension.attachments?.push(chatMessageAttachment);
1920
1748
  });
@@ -1939,22 +1767,13 @@ export class RemoteDataSource implements IRemoteDataSource {
1939
1767
  const dialogJid = QB.chat.helpers.getRoomJidFromDialogId(dto.dialogId);
1940
1768
  try {
1941
1769
  qbMessageId = await QBChatSendMessage(dialogJid, qbEntity);
1942
- console.log(
1943
- `Dialog joined status is ${this.joinStatusMap.has(
1944
- dto.dialogId,
1945
- )} and message was sent with Id: ${qbMessageId}`,
1946
- );
1947
- } catch (e) {
1770
+ console.log(`Dialog joined status is ${this.joinStatusMap.has(dto.dialogId)} and message was sent with Id: ${qbMessageId}`);
1771
+ }catch (e) {
1948
1772
  qbMessageId = undefined;
1949
- const errorMessage = `Error in DataSource: send message throw: ${stringifyError(
1950
- e,
1951
- )}`;
1773
+ const errorMessage = `Error in DataSource: send message throw: ${stringifyError(e)}`;
1952
1774
  console.log('Error in DataSource: send message throw: ', errorMessage);
1953
1775
  console.warn('Error in DataSource: send message throw: ', errorMessage);
1954
- console.error(
1955
- 'Error in DataSource: send message throw: ',
1956
- errorMessage,
1957
- );
1776
+ console.error('Error in DataSource: send message throw: ', errorMessage);
1958
1777
  }
1959
1778
  }
1960
1779
 
@@ -4,11 +4,11 @@ import { FileType } from './FileTypes';
4
4
  export default interface ChatMessageAttachmentEntity {
5
5
  /** ID of the file on QuickBlox server (UID of file from QB.content.createAndUpload) */
6
6
  id: string | number;
7
- uid?: string | number;
7
+ uid?: string;
8
8
  file?: FileEntity;
9
9
  type: FileType;
10
10
  /** Link to a file in Internet */
11
- url?: string | 0;
11
+ url?: string;
12
12
  name?: string;
13
13
  size?: number | string;
14
14
  [key: string]: unknown;
@@ -2,8 +2,8 @@ import { FileType } from './FileTypes';
2
2
 
3
3
  export interface FileEntity {
4
4
  id?: string | number;
5
- uid: string | number;
6
- url?: string | 0;
5
+ uid: string;
6
+ url?: string;
7
7
  name?: string;
8
8
  size?: number | string;
9
9
  type?: FileType;
@@ -26,7 +26,7 @@ export class GroupDialogEntity implements DialogEntity {
26
26
 
27
27
  name: string;
28
28
 
29
- photo?: string |number | null;
29
+ photo: string | null;
30
30
 
31
31
  constructor(
32
32
  customData: CustomDataEntity,
@@ -7,10 +7,6 @@ export interface IDialogsRepository {
7
7
 
8
8
  createDialogInRemote(dialog: DialogEntity): Promise<DialogEntity>;
9
9
 
10
- createDialogWithAutojoinInRemote(dialog: DialogEntity): Promise<DialogEntity>;
11
-
12
- createDialogSetUpAutojoinInRemote(dialog: DialogEntity): Promise<DialogEntity>;
13
-
14
10
  updateDialogInLocal(dialog: DialogEntity): Promise<DialogEntity>;
15
11
 
16
12
  updateDialogInRemote(dialog: DialogEntity): Promise<DialogEntity>;
@@ -34,14 +30,6 @@ export interface IDialogsRepository {
34
30
  userIds: Array<number>,
35
31
  ): Promise<boolean>;
36
32
 
37
- unjoinUsersFromDialog(
38
- dialogId: string,
39
- ): Promise<boolean>;
40
-
41
- joinUsersFromDialog(
42
- dialogId: string,
43
- ): Promise<boolean>;
44
-
45
33
  subscribeLocalSync(subscriber: FunctionTypeVoidToVoid): void;
46
34
 
47
35
  unsubscribeLocalSync(): void;
@@ -15,9 +15,9 @@ export class SyncDialogsUseCase extends BaseUseCase<boolean, boolean> {
15
15
 
16
16
  private callBackExecute: CallBackFunction<boolean> | undefined;
17
17
 
18
- private timer1Id: NodeJS.Timer | undefined;
18
+ private timer1Id: ReturnType<typeof setTimeout> | undefined;
19
19
 
20
- private timer2Id: NodeJS.Timer | undefined;
20
+ private timer2Id: ReturnType<typeof setTimeout> | undefined;
21
21
 
22
22
  private timerId: NodeJS.Timeout | null = null;
23
23
 
@@ -170,7 +170,7 @@ export class SyncDialogsUseCase extends BaseUseCase<boolean, boolean> {
170
170
  override release() {
171
171
  super.release();
172
172
  if (this.timerId) {
173
- clearInterval(this.timerId as NodeJS.Timeout);
173
+ clearInterval(this.timerId);
174
174
  }
175
175
  }
176
176
  }
@@ -11,7 +11,7 @@ export class UserTypingMessageUseCase implements IUseCase<void, void> {
11
11
 
12
12
  private typingTimeout = 3;
13
13
 
14
- private _typingTimer: NodeJS.Timeout | null = null;
14
+ private _typingTimer: ReturnType<typeof setInterval> | null = null;
15
15
 
16
16
  private _typingTime = 0;
17
17
 
@@ -36,7 +36,9 @@ export class UserTypingMessageUseCase implements IUseCase<void, void> {
36
36
  this._typingTimer = setInterval(() => {
37
37
  if ((Date.now() - this._typingTime) / 1000 >= this.typingTimeout) {
38
38
  this.messagesRepository.typingMessageStop(this.dialog, this.senderId);
39
- clearInterval(this._typingTimer as NodeJS.Timeout);
39
+ if (this._typingTimer) {
40
+ clearInterval(this._typingTimer);
41
+ }
40
42
  this._typingTimer = null;
41
43
  this._typingTime = 0;
42
44
  }
@@ -124,12 +124,9 @@ const AudioAttachment = ({
124
124
  preload="auto"
125
125
  style={{ display: 'none' }}
126
126
  >
127
- <source
128
- src={String(audioFile.url)}
129
- type={audioFile?.type?.toString()}
130
- />
131
- <source src={String(audioFile.url)} type="audio/mpeg" />
132
- <source src={String(audioFile.url)} type="audio/ogg" />
127
+ <source src={audioFile.url} type={audioFile?.type?.toString()} />
128
+ <source src={audioFile.url} type="audio/mpeg" />
129
+ <source src={audioFile.url} type="audio/ogg" />
133
130
  Your browser does not support the audio element.
134
131
  </audio>
135
132
  <div className="audio-controls">
@@ -148,9 +145,7 @@ const AudioAttachment = ({
148
145
  {isPlaying ? (
149
146
  <div className="equalizer">{renderRandomEqualizer()}</div>
150
147
  ) : (
151
- <div className="equalizer">
152
- {renderEqualizer(String(audioFile.url))}
153
- </div>
148
+ <div className="equalizer">{renderEqualizer(audioFile.uid)}</div>
154
149
  )}
155
150
  </div>
156
151
  </div>
@@ -25,12 +25,11 @@ import UiKitTheme from '../../themes/UiKitTheme';
25
25
  import { UserEntity } from '../../../Domain/entity/UserEntity';
26
26
  import useUsersListViewModel from './UsersList/useUsersListViewModel';
27
27
  import { PrivateDialogEntity } from '../../../Domain/entity/PrivateDialogEntity';
28
- import { CloseSvg, GroupChatSvg, LeaveSvg, SettingsFilledSvg } from '../../icons';
28
+ import { CloseSvg, GroupChatSvg, LeaveSvg } from '../../icons';
29
29
  import { Badge, Button, DialogWindow, SettingsItem } from '../../ui-components';
30
30
  import useModal from '../../../hooks/useModal';
31
31
  import Header from '../../ui-components/Header/Header';
32
32
  import InviteMembers from '../InviteMembers/InviteMembers';
33
- import { stringifyError } from '../../../utils/parse';
34
33
 
35
34
  type HeaderDialogsProps = {
36
35
  dialog: DialogEntity;
@@ -143,7 +142,7 @@ const DialogInfo = ({
143
142
  if (groupDialogEntity.photo) {
144
143
  return (
145
144
  <UserAvatar
146
- urlAvatar={String(groupDialogEntity.photo)}
145
+ urlAvatar={groupDialogEntity.photo}
147
146
  iconTheme={{ width: '81px', height: '81px' }}
148
147
  />
149
148
  );
@@ -204,7 +203,7 @@ const DialogInfo = ({
204
203
  };
205
204
 
206
205
  async function executeUpdateActions(params: EditDialogParams) {
207
- let newUidAvatar: string | number | undefined | null = null;
206
+ let newUidAvatar: string | undefined | null = null;
208
207
 
209
208
  console.log('before urlPhoto: ', newUidAvatar);
210
209
  if (params.dialogAvatar) {
@@ -400,7 +399,7 @@ const DialogInfo = ({
400
399
  disableActions={disableAction}
401
400
  nameDialog={dialogViewModel?.entity?.name || dialog?.name}
402
401
  typeDialog={dialogViewModel?.entity?.type || dialog?.type}
403
- ulrIcon={String(getUrlAvatar(dialogViewModel?.entity || dialog))}
402
+ ulrIcon={getUrlAvatar(dialogViewModel?.entity || dialog)}
404
403
  typeAddEditDialog={TypeOpenDialog.edit}
405
404
  clickUpdatedHandler={getDialogUpdatedInfoHandler}
406
405
  clickCancelHandler={editModal.toggleModal}
@@ -488,40 +487,6 @@ const DialogInfo = ({
488
487
  </Button>
489
488
  </div>
490
489
  </DialogWindow>
491
- <SettingsItem
492
- icon={<SettingsFilledSvg />}
493
- title="UnJoin dialog"
494
- onClick={!disableAction ? () => {
495
- dialogViewModel
496
- .unJoinDialog(dialog as GroupDialogEntity)
497
- .then((result) => {
498
- return result;
499
- })
500
- .catch((e) => {
501
- console.log('exception in UnJoinDialogFlow', stringifyError(e));
502
- });
503
- }: undefined}
504
- className={cn('dialog-info-leave', {
505
- 'dialog-info-leave--disable': disableAction,
506
- })}
507
- />
508
- <SettingsItem
509
- icon={<SettingsFilledSvg />}
510
- title="Join dialog"
511
- onClick={!disableAction ? () => {
512
- dialogViewModel
513
- .joinToDialog(dialog as GroupDialogEntity)
514
- .then((result) => {
515
- return result;
516
- })
517
- .catch((e) => {
518
- console.log('exception in JoinDialogFlow', stringifyError(e));
519
- });
520
- }: undefined}
521
- className={cn('dialog-info-leave', {
522
- 'dialog-info-leave--disable': disableAction,
523
- })}
524
- />
525
490
  </ColumnContainer>
526
491
  </div>
527
492
  );
@@ -1,7 +1,7 @@
1
1
  import BaseViewModel, {
2
2
  FunctionTypeBooleanToVoid,
3
3
  FunctionTypeDialogEntityToBoolean,
4
- FunctionTypeDialogEntityToDialogEntity, FunctionTypeDialogEntityWithAutoJoinToDialogEntity,
4
+ FunctionTypeDialogEntityToDialogEntity,
5
5
  FunctionTypeFileToFileEntity,
6
6
  FunctionTypePaginationToVoid,
7
7
  FunctionTypeVoidToVoid,
@@ -18,12 +18,8 @@ export interface DialogListViewModel extends BaseViewModel<DialogEntity> {
18
18
  release: FunctionTypeVoidToVoid; // release Content
19
19
  setWaitLoadingStatus: FunctionTypeBooleanToVoid; // set loading state
20
20
  createDialog: FunctionTypeDialogEntityToDialogEntity;
21
- createDialogForAutoJoin: FunctionTypeDialogEntityWithAutoJoinToDialogEntity;
22
- createDialogSetUpAutoJoin: FunctionTypeDialogEntityWithAutoJoinToDialogEntity;
23
21
  updateDialog: FunctionTypeDialogEntityToDialogEntity;
24
22
  deleteDialog: FunctionTypeDialogEntityToBoolean;
25
- unJoinDialog: FunctionTypeDialogEntityToBoolean;
26
- joinToDialog: FunctionTypeDialogEntityToBoolean;
27
23
  uploadFile: FunctionTypeFileToFileEntity;
28
24
  removeMembers: FunctionTypeDialogEntityToBoolean;
29
25
  }