Open Bug 1766796 Opened 3 years ago Updated 6 months ago

Calendar always changes organizer of event

Categories

(Calendar :: E-mail based Scheduling (iTIP/iMIP), defect)

Thunderbird 91
defect

Tracking

(Not tracked)

UNCONFIRMED

People

(Reporter: luca, Unassigned, NeedInfo)

References

Details

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:99.0) Gecko/20100101 Firefox/99.0

Steps to reproduce:

I have two caldav calendars. Both have a specific email "email-A" as username. However, the second calendar is associated to a different email "email-B" in its Properties settings.

I accepted a calendar invitation sent from another person to email-B, by clicking on the "Accept" button at the top of the invitation email.

Actual results:

Thunderbird sent two emails to each attendee of the event:

  1. First email, from email-A, to notify changing the organizer of the event to email-A.
  2. Second email, also from email-A, to notify acceptance of event.

Expected results:

The organizer should never have been changed. Only the acceptance email should have been sent, and from email-B (the original recipient of the invitation), not from email-A.

This bug could possibly be related to
https://bugzilla.mozilla.org/show_bug.cgi?id=1587736

Note: I think this is quite a severe bug. Changing the organizer of a calendar event is very impolite, and on top of that the change is spammed to all attendees of the event. I already had to send email apologies to organizer & attendees several times, explaining that it was a bug of my email client.

Component: General → E-mail based Scheduling (iTIP/iMIP)

I have a similar issue in TB 102, been happening for quite some time. This is a critical bug for me.

I have calendars loaded as google calendars that cannot accept invitations outside the organization (another bug). I have local caldav calendars that can accept the invites correctly. When I copy from the local calendars to the google calendars, the organizer is changed, if I am not careful, I will spam the entire invite list.

The worse problem is because the organizer has changed, the links for TEAMS or GoToMeeting don't work, because the organizer is not authenticated on the other side.

See Also: → 1864415

I have identified the origin of an issue where the organizer name is incorrect if the user has email aliases. This issue can be found in the source file mozilla-unified/comm/calendar/providers/caldav/CalDavCalendar.sys.mjs, around line 1870 (version 130.0, but it has been present for a long time).
Here is the relevant code that updates the mCalendarUserAddress property:

          for (const addr of response.firstProps["C:calendar-user-address-set"]) {
            if (addr.match(/^mailto:/i)) {
              cal.LOG("BRS: calendar-user-address-set := " + addr);
              this.mCalendarUserAddress = addr;
            }
          }

The mCalendarUserAddress property is updated in a cycle that overwrites previous email addresses, resulting in the last email alias being used as the organizer name. I do not understand the reasoning behind this cycle. If anyone has insights, please share them.

As a quick solution, I modified the code to use the first email returned in the calendar-user-address-set field of XML response from the server. This first email address, in my case, is the main email address, which I prefer to use:

          const addrSet = response.firstProps["C:calendar-user-address-set"];
          const firstAddr = addrSet.find(addr => addr.match(/^mailto:/i));
          if (firstAddr) {
            cal.LOG("Calendar-user-address-set as: " + firstAddr);
            this.mCalendarUserAddress = firstAddr;
          }

There is still, however, another issue where the explicit user setting of "email" for the calendar is overridden by this parameter. I plan to investigate this further.

Related topics:
https://bugzilla.mozilla.org/show_bug.cgi?id=1766796 (this topic)
https://bugzilla.mozilla.org/show_bug.cgi?id=865726
https://bugzilla.mozilla.org/show_bug.cgi?id=1587736
https://support.mozilla.org/en-US/questions/1428206
https://community.mailcow.email/d/2658-calendar-invitations-in-thunderbird-wrong-organizator/11

See Also: → 1587736

(In reply to Sergey Korablin [:brs-brs] from comment #3)

https://support.mozilla.org/en-US/questions/1428206
Sergey, did you find more things that needed fixing?

Just to add to this, the "workaround" of clicking on the default-set (wrong) email address and typing the correct organizer email/alias does not change the organizer. The issue persists for me.

My setup is a fastmail account with a primary login email - which is for login only. And a bunch of identities - one of which I have set as the "email" (whatever that means) for the CalDAV calendar. But whenever I create an event to share, the organizer email is always something else that was fetched from the server. There is no way to fix this currently.

I would suggest that Thunderbird provide a way to set the organizer in the UI as a dropdown rather than the user having to noodle in the invite list - which has poor UI

The code in comment #3 was added in bug 1587736. Can this bug be closed as a duplicate?

Flags: needinfo?(brs)

(In reply to Francesco from comment #7)

The code in comment #3 was added in bug 1587736. Can this bug be closed as a duplicate?

Not sure the present bug is still solved with that. That comment says 'explicit user setting of "email" for the calendar is still overridden', and the part of the problem of the present bug is in accepting an invitation, rather than creating and sending a new one.

Unfortunately I can't test this because I'm staying with Thunderbird 102.15 after the vertical-space-unfriendly change in user interface in the new versions...

You need to log in before you can comment on or make changes to this bug.