Skip to content

Commit 450eafd

Browse files
committed
### 4.0.90
- bug-fix: save new conversation in local storage
1 parent f72b4de commit 450eafd

File tree

7 files changed

+32
-5
lines changed

7 files changed

+32
-5
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# chat21-web-widget ver 3.0
22

3+
### 4.0.90
4+
- bug-fix: save new conversation in local storage
5+
36
### 4.0.89
47
- bug-fix: new message on startFromHome false only when chat is opened
58
- change: disabled soundMessage

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@chat21/chat21-web-widget",
33
"author": "Dario De Pascalis - Frontiere21 SRL",
4-
"version": "4.0.89",
4+
"version": "4.0.90",
55
"license": "AGPL-3.0",
66
"homepage": "https://www.tiledesk.com",
77
"repository": {

src/app/app.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -676,7 +676,7 @@ export class AppComponent implements OnInit, AfterViewInit, OnDestroy {
676676
// console.log('11111', this.g.isOpen, this.g.recipientId);
677677
this.isOpenConversation = false;
678678
if (!this.g.recipientId && this.g.isOpen) {
679-
//this.startNwConversation();
679+
// this.startNwConversation();
680680
this.openNewConversation();
681681
}
682682
}

src/app/components/conversation/conversation.component.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@ export class ConversationComponent implements OnInit, AfterViewInit, OnChanges {
194194
// this.isShowSpinner();
195195
this.g.wdLog([' --------ngAfterViewInit--------AAAAAA ', this.g.recipientId]);
196196
// this.storageService.setItem('activeConversation', this.conversation.uid);
197+
197198
// --------------------------- //
198199
// after animation intro
199200
setTimeout(() => {
@@ -472,8 +473,31 @@ export class ConversationComponent implements OnInit, AfterViewInit, OnChanges {
472473
if ( !recipientId ) { this.g.setParameter('recipientId', this.setRecipientId()); }
473474
if ( !channelType ) { this.g.setParameter('channelType', this.setChannelType()); }
474475
this.conversationWith = recipientId as string;
476+
if (!this.conversation) {
477+
this.conversation = new ConversationModel(
478+
recipientId,
479+
{},
480+
channelType,
481+
true,
482+
'',
483+
recipientId,
484+
this.g.recipientFullname,
485+
this.g.senderId,
486+
this.g.userFullname,
487+
'0',
488+
0,
489+
TYPE_MSG_TEXT,
490+
'',
491+
'',
492+
'',
493+
'',
494+
0,
495+
false
496+
);
497+
}
475498
}
476499

500+
477501
/**
478502
*
479503
*/

src/app/utils/globals.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ export class Globals {
166166
welcomeMsg: string;
167167
recipientId: string;
168168
newConversationStart: boolean;
169-
recipientFullname: String;
169+
recipientFullname: string;
170170
userId: string;
171171
userPassword: string;
172172
userToken: string;

src/test.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
marginX: "100px",
2929
// autoStart: false,
3030
// persistence: 'session'
31-
startFromHome: true,
31+
startFromHome: false,
3232
//preChatForm: false,
3333
// tenant: "tenant test",
3434
// widgetTitle: "widget Title Test"

0 commit comments

Comments
 (0)