Mailspring: Support for responding to calendar events

Created on 18 Nov 2018  路  6Comments  路  Source: Foundry376/Mailspring

What operating system are you using?

Manjaro linux

What version of Mailspring are you using?

version 1.5.2

Email service

Exchange

--

Feature Request?

The current state

Currently when an email is received with a calendar event as an attachment its not detected as a calendar event so I cannot respond to the invite.

What I did

I tried writing a plugin which could detect the attachments,

main.es6
...
  ExtensionRegistry.MessageView.register(OutlookCalendarEvent);
...
import { MessageViewExtension,
         Actions,
         AttachmentStore } from 'mailspring-exports';

export default class OutlookCalendarEvent extends MessageViewExtension {
    static renderedMessageBodyIntoDocument({ document, message, iframe }) {
        message.files.map(file => {
            if (file.contentType === "text/calendar") {
                var filepath = AttachmentStore.pathForFile(file);
                fetch(filepath).then(response => {
                    var filedata = response.text()
                    console.log('FOUND FILE', filedata)
                })

                console.log("FOUND CALENDAR EVENT", file, filepath);

                var div = document.createElement('div');
                div.className = 'btn';
                div.innerText = 'Accept event invite';

                // iframe.insertAdjacentHTML('afterend', '<div class="btn">Accept invite</div>');
                document.body.append(div);

            };
        });

    };
}

Though the above adds a button under the displayed message, after some inspection I found that the above approach is not that accurate i.e. it would make more sense to have another element type to handle such attachments as done here

What I would like

I would be great if the calendar event attachment is detected and the relevant action buttons are shown to the user. I am willing to take up this task if someone is willing to help me out a little.

PS: I am using MineTime for calendar and as an end goal I would like to see the accepted events reflected there!

calendar

Most helpful comment

I see "Accept" etc buttons, but I find clicking these doesn't update the status of my calendar in Google.

Any idea where to start debugging this?

All 6 comments

It looks like this is already on the roadmap for summer, 2019.

Thanks Mailspring for implementing this (version 1.6.2-278bf219)!!

I see "Accept" etc buttons, but I find clicking these doesn't update the status of my calendar in Google.

Any idea where to start debugging this?

@ashb I'm also noticing this behavior as well. I'm a PRO user too.

this feature doesn't work for me either -- how do i add calendar invites from mailspring to google calendar?

This problem affects me too (Mailspring + GCal). Seeing as this issue is closed, is there another one that flags the problem?

Was this page helpful?
0 / 5 - 0 ratings