@chat21/chat21-ionic 3.0.70-rc.1 → 3.0.70-rc.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # chat21-ionic ver 3.0
2
2
 
3
+ ### 3.0.70-rc.2
4
+ - added: cache control max-age
5
+
3
6
  ### 3.0.70-rc.1
4
7
  - changed: README and LICENSE files
5
8
  - added: cached conversations from storage in FirebaseConversationsHandlerService
package/config.xml CHANGED
@@ -1,5 +1,5 @@
1
1
  <?xml version='1.0' encoding='utf-8'?>
2
- <widget id="chat.tiledesk" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
2
+ <widget android-packageName="chat.ionic" android-versionCode="1" id="chat.tiledesk" ios-CFBundleIdentifier="it.chat.ionic" ios-CFBundleVersion="1.0.0" version="0.0.2" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
3
3
  <name>Chat21</name>
4
4
  <description>Chat21 is the core of the open source live chat platform</description>
5
5
  <author email="" href="https://tiledesk.com/">Tiledesk Team</author>
@@ -24,7 +24,7 @@
24
24
  <edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application" xmlns:android="http://schemas.android.com/apk/res/android">
25
25
  <application android:networkSecurityConfig="@xml/network_security_config" />
26
26
  </edit-config>
27
- <resource-file src="resources/android/xml/network_security_config.xml" target="res/xml/network_security_config.xml" />
27
+ <resource-file src="resources/android/xml/network_security_config.xml" target="app/src/main/res/xml/network_security_config.xml" />
28
28
  <allow-intent href="market:*" />
29
29
  <icon density="ldpi" src="resources/android/icon/drawable-ldpi-icon.png" />
30
30
  <icon density="mdpi" src="resources/android/icon/drawable-mdpi-icon.png" />
@@ -19,8 +19,8 @@ cp -p src/manifest.json platforms/browser/www/
19
19
  cp -p src/chat-config.json platforms/browser/www/
20
20
 
21
21
  cd platforms/browser/www
22
- aws s3 sync . s3://tiledesk-dashboard-pre/chat-ionic5/$version/
23
- aws s3 sync . s3://tiledesk-dashboard-pre/chat-ionic5/
22
+ aws s3 sync . s3://tiledesk-dashboard-pre/chat-ionic5/$version/ --cache-control max-age=300
23
+ aws s3 sync . s3://tiledesk-dashboard-pre/chat-ionic5/ --cache-control max-age=300
24
24
  cd ../../../
25
25
 
26
26
  #aws cloudfront create-invalidation --distribution-id E13L8CUUKUWAJF --paths "/*"
@@ -18,9 +18,9 @@ cp -p src/manifest.json platforms/browser/www/
18
18
  cp -p src/chat-config.json platforms/browser/www/
19
19
 
20
20
  cd platforms/browser/www
21
- aws s3 sync . s3://tiledesk-console/v2/chat/
22
- aws s3 sync . s3://tiledesk-console/v2/chat/$version/
23
- # aws s3 sync . s3://tiledesk-console/v2/chat/latest/
21
+ aws s3 sync . s3://tiledesk-console/v2/chat/ --cache-control max-age=172800
22
+ aws s3 sync . s3://tiledesk-console/v2/chat/$version/ --cache-control max-age=172800
23
+ # aws s3 sync . s3://tiledesk-console/v2/chat/latest/ --cache-control max-age=172800
24
24
  cd ../../../
25
25
 
26
26
  # aws cloudfront create-invalidation --distribution-id E36UIP90GOSFPM --paths "/*"
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.70-rc.1",
4
+ "version": "3.0.70-rc.2",
5
5
  "license": "AGPL-3.0",
6
6
  "homepage": "https://tiledesk.com/",
7
7
  "repository": {
@@ -44,6 +44,7 @@
44
44
  "@ngx-translate/http-loader": "^4.0.0",
45
45
  "angular2-moment": "^1.9.0",
46
46
  "autolinker": "^3.14.2",
47
+ "cordova-android": "9.1.0",
47
48
  "cordova-android-support-gradle-release": "^3.0.1",
48
49
  "cordova-browser": "^5.0.4",
49
50
  "cordova-ios": "6.1.1",
@@ -83,7 +84,6 @@
83
84
  "@types/jasmine": "~3.3.8",
84
85
  "@types/jasminewd2": "~2.0.3",
85
86
  "codelyzer": "^5.0.0",
86
- "cordova-android": "^9.1.0",
87
87
  "cordova-plugin-add-swift-support": "^2.0.2",
88
88
  "jasmine-core": "~3.4.0",
89
89
  "jasmine-spec-reporter": "~4.2.1",
@@ -119,4 +119,4 @@
119
119
  "android"
120
120
  ]
121
121
  }
122
- }
122
+ }
@@ -1,2 +1,5 @@
1
- <span class="base_info" [innerHTML]="message?.text | htmlEntiesEncode | marked"></span>
2
- <!-- <span class="base_info" [innerHTML]="message_text | marked"></span> -->
1
+ <span class="base_info" [innerHTML]="message?.text | htmlEntiesEncode | marked" [tooltip]="timeTooltipLeft" placement="left" content-type="template">
2
+ <!-- <span class="base_info" [innerHTML]="message_text | marked"></span> -->
3
+ <ng-template #timeTooltipLeft>
4
+ <span>{{message.timestamp | amTimeAgo}} ({{message.timestamp | amLocal | amDateFormat: 'L HH:mm:ss'}})</span>
5
+ </ng-template>
@@ -131,53 +131,53 @@ export class FirebaseConversationsHandler extends ConversationsHandlerService {
131
131
  //----------------------------------------------------------------------------------
132
132
  subscribeToConversations(lastConversationTimestamp: number, callback) {
133
133
  const that = this;
134
- this.getConversationsFromLocalStorage()
134
+ // this.getConversationsFromLocalStorage()
135
135
  const urlNodeFirebase = conversationsPathForUserId(this.tenant, this.loggedUserId);
136
136
  this.logger.debug('[FIREBASEConversationsHandlerSERVICE] SubscribeToConversations conversations::ACTIVE urlNodeFirebase', urlNodeFirebase)
137
137
  this.ref = firebase.database().ref(urlNodeFirebase).orderByChild('timestamp').limitToLast(200);
138
138
 
139
- this.ref.once('value').then(snapshot => {
140
- this.conversations.splice(0) //empty conversations list and replace storedConversations with remote onces
141
- if(snapshot && snapshot.val()){
139
+ // this.ref.once('value').then(snapshot => {
140
+ // this.conversations.splice(0) //empty conversations list and replace storedConversations with remote onces
141
+ // if(snapshot && snapshot.val()){
142
142
 
143
- snapshot.forEach(childSnapshot => {
144
- // const childData: ConversationModel = childSnapshot.val();
145
- // childData.uid = childSnapshot.key
146
- // that.added(childData)
147
- // lastConversationTimestamp = childData.timestamp
148
- that.added(childSnapshot)
149
- });
150
- this.logger.debug('[FIREBASEConversationsHandlerSERVICE] # of remote conversations on Firebase:', Object.keys(snapshot.val()).length)
151
- this.logger.debug('[FIREBASEConversationsHandlerSERVICE] # of conversation added:', that.conversations)
152
- callback(that.conversations)
153
- return lastConversationTimestamp
154
- }
143
+ // snapshot.forEach(childSnapshot => {
144
+ // // const childData: ConversationModel = childSnapshot.val();
145
+ // // childData.uid = childSnapshot.key
146
+ // // that.added(childData)
147
+ // // lastConversationTimestamp = childData.timestamp
148
+ // that.added(childSnapshot)
149
+ // });
150
+ // this.logger.debug('[FIREBASEConversationsHandlerSERVICE] # of remote conversations on Firebase:', Object.keys(snapshot.val()).length)
151
+ // this.logger.debug('[FIREBASEConversationsHandlerSERVICE] # of conversation added:', that.conversations)
152
+ // callback(that.conversations)
153
+ // return lastConversationTimestamp
154
+ // }
155
155
 
156
- }).then(()=> {
157
- this.ref.on('child_changed', (childSnapshot) => {
158
- that.changed(childSnapshot);
159
- });
160
- this.ref.on('child_removed', (childSnapshot) => {
161
- that.removed(childSnapshot);
162
- });
163
- this.ref.on('child_added', (childSnapshot) => {
164
- that.added(childSnapshot);
165
- });
166
- })
156
+ // }).then(()=> {
157
+ // this.ref.on('child_changed', (childSnapshot) => {
158
+ // that.changed(childSnapshot);
159
+ // });
160
+ // this.ref.on('child_removed', (childSnapshot) => {
161
+ // that.removed(childSnapshot);
162
+ // });
163
+ // this.ref.on('child_added', (childSnapshot) => {
164
+ // that.added(childSnapshot);
165
+ // });
166
+ // })
167
167
 
168
- // this.ref.on('child_changed', (childSnapshot) => {
169
- // that.changed(childSnapshot);
170
- // });
171
- // this.ref.on('child_removed', (childSnapshot) => {
172
- // that.removed(childSnapshot);
173
- // });
174
- // this.ref.on('child_added', (childSnapshot) => {
175
- // that.added(childSnapshot);
176
- // });
177
-
178
- // setTimeout(() => {
179
- // callback()
180
- // }, 2000);
168
+ this.ref.on('child_changed', (childSnapshot) => {
169
+ that.changed(childSnapshot);
170
+ });
171
+ this.ref.on('child_removed', (childSnapshot) => {
172
+ that.removed(childSnapshot);
173
+ });
174
+ this.ref.on('child_added', (childSnapshot) => {
175
+ that.added(childSnapshot);
176
+ });
177
+
178
+ setTimeout(() => {
179
+ callback()
180
+ }, 2000);
181
181
  }
182
182
 
183
183
  public getLastConversation(callback: (conversation: ConversationModel, error: string)=>void){