summaryrefslogtreecommitdiff
path: root/ui/app
diff options
context:
space:
mode:
Diffstat (limited to 'ui/app')
-rw-r--r--ui/app/components/main_panel/imap_button.js6
-rw-r--r--ui/app/lib/bitmask.js2
2 files changed, 3 insertions, 5 deletions
diff --git a/ui/app/components/main_panel/imap_button.js b/ui/app/components/main_panel/imap_button.js
index 3d02d3f..122e463 100644
--- a/ui/app/components/main_panel/imap_button.js
+++ b/ui/app/components/main_panel/imap_button.js
@@ -32,10 +32,8 @@ export default class IMAPButton extends React.Component {
onClick() {
if (!this.state.token) {
- bitmask.mail.get_token().then(response => {
- if (response.user == this.props.account.address) {
- this.setState({token: response.token})
- }
+ bitmask.mail.get_token(this.props.account.id).then(response => {
+ this.setState({token: response.token})
})
}
this.setState({showModal: true})
diff --git a/ui/app/lib/bitmask.js b/ui/app/lib/bitmask.js
index b8d6a95..bfdf050 100644
--- a/ui/app/lib/bitmask.js
+++ b/ui/app/lib/bitmask.js
@@ -318,7 +318,7 @@ var bitmask = function(){
*
* @param {string} uid The uid to get status about
*
- * @return {Promise<string>} The token
+ * @return {Promise<{'token': string}>} The token
*/
get_token: function(uid) {
return call(['mail', 'get_token', uid]);