MCPcopy Create free account
hub / github.com/mailvelope/mailvelope / onEditorMount

Method onEditorMount

src/controller/editor.controller.js:64–83  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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({

Callers

nothing calls this directly

Calls 2

getAccessTokenMethod · 0.95
emitMethod · 0.45

Tested by

no test coverage detected