@chat21/chat21-ionic 3.0.72-rc.1 → 3.0.73

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # chat21-ionic ver 3.0
2
2
 
3
+ ### 3.0.73 in PROD
4
+
5
+ ### 3.0.73-rc.1
6
+ - bug-fixed: topic.split is not a function while a conversation is closed by an agent in MQTT-conversations-handler.service
7
+ - removed: user id from contact-directory component
8
+
9
+ ### 3.0.72 in PROD
10
+
3
11
  ### 3.0.72-rc.1
4
12
  - added: user presence on contact-directory component
5
13
 
@@ -26,5 +26,5 @@ cd ../../../
26
26
  # aws cloudfront create-invalidation --distribution-id E36UIP90GOSFPM --paths "/*"
27
27
 
28
28
  # echo new version deployed on s3://tiledesk-dashboard/chat/$NEW_BUILD/
29
- echo new version deployed on s3://tiledesk-console/v2/chat-ionic5/$version/
30
- echo available on https://console.tiledesk.com/v2/chat-ionic5/$version/index.html
29
+ echo new version deployed on s3://tiledesk-console/v2/chat/$version/
30
+ echo available on https://console.tiledesk.com/v2/chat/$version/index.html
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@chat21/chat21-ionic",
3
3
  "author": "Tiledesk SRL",
4
- "version": "3.0.72-rc.1",
4
+ "version": "3.0.73",
5
5
  "license": "AGPL-3.0",
6
6
  "homepage": "https://tiledesk.com/",
7
7
  "repository": {
@@ -19,7 +19,7 @@
19
19
 
20
20
  <ion-label>
21
21
  <h2>{{ user.fullname }}</h2>
22
- <p>{{ user.uid }}</p>
22
+ <!-- <p>{{ user.uid }}</p> -->
23
23
  </ion-label>
24
24
 
25
25
  </ion-item>
@@ -1,2 +1,2 @@
1
1
  <div class="status-icon" [class.online]="isOnline" [style.border-color]="borderColor"></div>
2
- <div class="online-point" [style.color]="fontColor">{{status}}</div>
2
+ <!-- <div class="online-point" [style.color]="fontColor">{{status}}</div> -->
@@ -1,4 +1,4 @@
1
- import { PresenceComponent } from '../../components/presence/presence.component';
1
+ import { PresenceComponent } from '../../components/utils/presence/presence.component';
2
2
  import { NgModule } from '@angular/core';
3
3
  import { CommonModule } from '@angular/common';
4
4
  import { FormsModule } from '@angular/forms';
Binary file
@@ -169,13 +169,14 @@ export class MQTTConversationsHandler extends ConversationsHandlerService {
169
169
  const handlerConversationDeleted = this.chat21Service.chatClient.onConversationDeleted( (conv, topic) => {
170
170
  this.logger.debug('[MQTTConversationsHandler] conversation deleted:', conv, topic);
171
171
  // example topic: apps.tilechat.users.ME.conversations.CONVERS-WITH.clientdeleted
172
- const topic_parts = topic.split("/")
173
- this.logger.debug('[MQTTConversationsHandler] topic and parts', topic_parts)
174
- if (topic_parts.length < 7) {
175
- this.logger.error('[MQTTConversationsHandler] Error. Not a conversation-deleted topic:', topic);
176
- return
177
- }
178
- const convers_with = topic_parts[5];
172
+ // const topic_parts = topic.split("/")
173
+ // this.logger.debug('[MQTTConversationsHandler] topic and parts', topic_parts)
174
+ // if (topic_parts.leßngth < 7) {
175
+ // this.logger.error('[MQTTConversationsHandler] Error. Not a conversation-deleted topic:', topic);
176
+ // return
177
+ // }
178
+ // const convers_with = topic_parts[5];
179
+ const convers_with = topic.conversWith;
179
180
  this.removed({
180
181
  uid: convers_with
181
182
  });
@@ -85,6 +85,37 @@ export function messageType(msgType: string, message: any) {
85
85
  }
86
86
  }
87
87
 
88
+ /** */
89
+ export function getSizeImg(message: any, maxWidthImage?: number): any {
90
+ try {
91
+ const metadata = message.metadata;
92
+ const sizeImage = {
93
+ width: metadata.width,
94
+ height: metadata.height
95
+ };
96
+ if (!maxWidthImage) {
97
+ maxWidthImage = MAX_WIDTH_IMAGES;
98
+ }
99
+ if (metadata.width && metadata.width > maxWidthImage) {
100
+ const rapporto = (metadata['width'] / metadata['height']);
101
+ sizeImage.width = maxWidthImage;
102
+ sizeImage.height = maxWidthImage / rapporto;
103
+ }
104
+ return sizeImage;
105
+ } catch (err) {
106
+ console.error('error: ', err);
107
+ return;
108
+ }
109
+ }
110
+
111
+ /** */
112
+ export function isChannelTypeGroup(channelType: string) {
113
+ if (channelType === CHANNEL_TYPE_GROUP || channelType === TYPE_SUPPORT_GROUP) {
114
+ return true;
115
+ }
116
+ return false;
117
+ }
118
+
88
119
  export function isEmojii(message: any){
89
120
 
90
121
  // let emoji = '';
@@ -115,38 +146,24 @@ export function isEmojii(message: any){
115
146
  }
116
147
  }
117
148
 
118
-
119
-
120
-
121
- /** */
122
- export function getSizeImg(message: any, maxWidthImage?: number): any {
123
- try {
124
- const metadata = message.metadata;
125
- const sizeImage = {
126
- width: metadata.width,
127
- height: metadata.height
128
- };
129
- if (!maxWidthImage) {
130
- maxWidthImage = MAX_WIDTH_IMAGES;
131
- }
132
- if (metadata.width && metadata.width > maxWidthImage) {
133
- const rapporto = (metadata['width'] / metadata['height']);
134
- sizeImage.width = maxWidthImage;
135
- sizeImage.height = maxWidthImage / rapporto;
136
- }
137
- return sizeImage;
138
- } catch (err) {
139
- console.error('error: ', err);
140
- return;
149
+ export function checkIfIsMemberJoinedGroup(msg, loggedUser): boolean{
150
+ if(msg && msg.attributes && msg.attributes.messagelabel
151
+ && msg.attributes.messagelabel['key']=== "MEMBER_JOINED_GROUP"
152
+ && msg.attributes.messagelabel.parameters['member_id'] !== loggedUser.uid
153
+ && !msg.attributes.messagelabel.parameters['member_id'].includes('bot')
154
+ && !msg.attributes.messagelabel.parameters['member_id'].includes('system')){
155
+ return true
141
156
  }
157
+ return false
158
+
142
159
  }
143
160
 
144
- /** */
145
- export function isChannelTypeGroup(channelType: string) {
146
- if (channelType === CHANNEL_TYPE_GROUP || channelType === TYPE_SUPPORT_GROUP) {
147
- return true;
161
+ export function hideInfoMessage(msg, infoMessageKeyEnabled): boolean{
162
+ if(msg && msg.attributes && msg.attributes.messagelabel
163
+ && infoMessageKeyEnabled.includes(msg.attributes.messagelabel['key'])){
164
+ return false
148
165
  }
149
- return false;
166
+ return true
150
167
  }
151
168
 
152
169