@chat21/chat21-ionic 3.0.72-rc.1 → 3.0.72
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 +2 -0
- package/deploy_amazon_prod.sh +2 -2
- package/package.json +1 -1
- package/src/app/components/{presence → utils/presence}/presence.component.html +1 -1
- package/src/app/components/{presence → utils/presence}/presence.component.scss +0 -0
- package/src/app/components/{presence → utils/presence}/presence.component.spec.ts +0 -0
- package/src/app/components/{presence → utils/presence}/presence.component.ts +0 -0
- package/src/app/pages/contacts-directory/contacts-directory.module.ts +1 -1
- package/src/chat21-core/utils/utils-message.ts +45 -28
package/CHANGELOG.md
CHANGED
package/deploy_amazon_prod.sh
CHANGED
|
@@ -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
|
|
30
|
-
echo available on https://console.tiledesk.com/v2/chat
|
|
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,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> -->
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -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';
|
|
@@ -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
|
-
|
|
123
|
-
|
|
124
|
-
|
|
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
|
-
|
|
146
|
-
|
|
147
|
-
|
|
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
|
|
166
|
+
return true
|
|
150
167
|
}
|
|
151
168
|
|
|
152
169
|
|