Mailspring icon indicating copy to clipboard operation
Mailspring copied to clipboard

Support for responding to calendar events

Open kansi opened this issue 8 years ago • 7 comments

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!

kansi avatar Nov 18 '18 11:11 kansi

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

Ancillas avatar Jan 29 '19 17:01 Ancillas

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

frigaut avatar Jun 19 '19 00:06 frigaut

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 avatar Feb 24 '20 17:02 ashb

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

donnfelker avatar Mar 02 '20 22:03 donnfelker

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

elliottash avatar Mar 19 '20 08:03 elliottash

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

yousefamar avatar Nov 27 '20 17:11 yousefamar

Hey @kansi,

Thanks for the detailed feature request and for trying to implement a solution yourself! There's been a ton of work on calendar support since this issue was reported, including significant improvements to RSVP handling.

We've implemented proper RFC 5546/6047 compliant RSVP support in recent versions, along with comprehensive calendar features like month/day views, event search, drag-to-reschedule, and event creation. The RSVP buttons you were looking for should now properly synchronize your responses back to your calendar service.

If you're still experiencing issues with calendar responses not syncing to Google Calendar or other providers, please check that you have the latest version installed. You can download it from https://getmailspring.com/download.

If you continue to see issues, feel free to report it on our community forums at https://community.getmailspring.com or open a new issue with details about your setup!

bengotow avatar Jan 27 '26 04:01 bengotow