()
| 62 | } |
| 63 | |
| 64 | async onEditorMount() { |
| 65 | this.ports.editor.emit('set-mode', { |
| 66 | embedded: Boolean(this.ports.editorCont), |
| 67 | integration: this.state.integration |
| 68 | }); |
| 69 | if (this.state.integration) { |
| 70 | try { |
| 71 | await this.getAccessToken(); |
| 72 | } catch (error) { |
| 73 | this.ports.editor.emit('error-message', { |
| 74 | error: { |
| 75 | code: 'AUTHORIZATION_FAILED', |
| 76 | message: error.message, |
| 77 | autoHide: false, |
| 78 | dismissable: false |
| 79 | } |
| 80 | }); |
| 81 | } |
| 82 | } |
| 83 | } |
| 84 | |
| 85 | async getAccessToken() { |
| 86 | return this.peers.gmailController.getAccessToken({ |
nothing calls this directly
no test coverage detected