Skip to content

Commit 1d2a33f

Browse files
committed
Revises Client Login
This commit revises the Client Login method to save save the created session for use later. Signed-off-by: Lui de la Parra <Lui@mutesymphony.com>
1 parent eaa8b92 commit 1d2a33f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/models/client.model.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,8 @@ class Client extends Document {
137137
return new Promise((resolve, reject) =>
138138
this.agent.connection
139139
.start(!_.isEmpty(this.agent.agent) ? this.agent.localize() : false)
140-
.then(response => resolve(response))
140+
.then(body => this.data.outgoing(body))
141+
.then(body => this._save(resolve(body)))
141142
.catch(error => this._save(reject(error)))
142143
);
143144
}

0 commit comments

Comments
 (0)