@afx Thanks for the update. I have flagged this topic as solved, as it seems to work
Calendar invite email
-
Hello,
At first: Inviting and managing attendee per-event status information across users is beyond the scope of “plain CalDAV”. It’s defined in RFC 6638: Scheduling Extensions to CalDAV.
To use these features, both server and client have to support these extensions. The “scheduling agent” may either be the server (default, server manages attendees, sends invitations etc), the client, or none.
When you add an attendee to an event, DAVdroid uploads this attendee with
RSVP=TRUE
. This requests that the server (!) sends invitations. Then the server manages attendee status and updates it (together with increasingSEQ
), when necessary. DAVdroid and other clients receive these updates and save them accordingly.RFC 6638 support in DAVdroid may not be perfect, but the basic operations should work (tested with various servers).
-
Thanks for this great reply!
I just created a test event on my android. Querying the server database after syncing shows the event (as expected) and here is the relevant part from the calendardata column:ORGANIZER:mailto:me@myserver.de\r ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;RSVP=TRUE;PARTSTAT=ACCEPTED\r :mailto:me@myserver.de\r ATTENDEE;CN=guest@myserver.de;CUTYPE=INDIVIDUAL;ROLE=NON-PARTICIPANT;PARTSTAT=NEE\r DS-ACTION:mailto:guest@myserver.de\r
This does not show
RSVP=TRUE
for the guest - only for myself (which explains why the server doesn’t sent invites).
Looking at the code you referenced I can understand that theRSVP=TRUE
isn’t set (only set forRELATIONSHIP_SPEAKER
).
I googled for a while but I couldn’t find any documentation on whenRELATIONSHIP_SPEAKER
is set - it doesn’t seem to be set for normal guests. My next question now is: why isRSVP=TRUE
only set for the organizer (which obviously getsRELATIONSHIP_SPEAKER
) and not for guests (who doesn’t seem to getRELATIONSHIP_SPEAKER
)? -
@maximilian said:
Thanks for this great reply!
I just created a test event on my android. Querying the server database after syncing shows the event (as expected) and here is the relevant part from the calendardata column: […]This is only what OwnCloud stores after processing the iCalendar. To see what DAVdroid sends, please use “verbose logging” in DAVdroid.
This does not show
RSVP=TRUE
for the guest - only for myself (which explains why the server doesn’t sent invites).The server may have removed
RSVP=TRUE
for the guest already. You can’t know that when you only check the iCalendar that is stored on the server.Looking at the code you referenced I can understand that the
RSVP=TRUE
isn’t set (only set forRELATIONSHIP_SPEAKER
).Don’t let the syntax of Java’s
switch
statement fool you:Rsvp
is set whenrelationship
is eitherRELATIONSHIP_ORGANIZER
,Attendees.RELATIONSHIP_ATTENDEE
,Attendees.RELATIONSHIP_PERFORMER
, orAttendees.RELATIONSHIP_SPEAKER
. -
This is only what OwnCloud stores after processing the iCalendar. To see what DAVdroid sends, please use “verbose logging” in DAVdroid.
That’s not so easy, beacuse the logs are overwritten after each sync so I ended up with the “Contact birthdays” log all the time. Using ADB didn’t help either because it doesn’t contain the the calendar entry. I set up a new account to check and here is the result (same observation as before with querying the server):
[trace] ORGANIZER:mailto:test@myserver.de [trace] ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;RSVP=TRUE;PARTSTAT=ACCEPTED [trace] :mailto:test@myserver.de [trace] ATTENDEE;CN=guest@myserver.de;CUTYPE=INDIVIDUAL;ROLE=NON-PARTICIPANT;PARTSTAT=NEE [trace] DS-ACTION:mailto:guest@myserver.de
So the
RSVP=TRUE
isn’t set for the guest…Don’t let the syntax of Java’s switch statement fool you: Rsvp is set when relationship is either RELATIONSHIP_ORGANIZER, Attendees.RELATIONSHIP_ATTENDEE, Attendees.RELATIONSHIP_PERFORMER, or Attendees.RELATIONSHIP_SPEAKER.
That’s embarrassing. Sorry for wasting your time.
-
Do you agree that the
RSVP=TRUE
should be set for the guest and that it isn’t set?Is this a problem with the Google Calendar App or with DAVdroid? Con you give me any hints on how to further investigate this?
Thank you -
@maximilian said:
Do you agree that the
RSVP=TRUE
should be set for the guest and that it isn’t set?No:
- According to the code,
RSVP=TRUE
will be added for the relationships listed above. - I have just tried it out here, and
RSVP=TRUE
was set when I have added a guest.
However, I think I found the cause of the problem. Your line from the trace is:
ATTENDEE;CN=guest@myserver.de;CUTYPE=INDIVIDUAL;ROLE=NON-PARTICIPANT;PARTSTAT=NEEDS-ACTION:mailto:guest@myserver.de
while mine is:
ATTENDEE;CN=guest@xxxx.tld;CUTYPE=INDIVIDUAL;ROLE=OPT-PARTICIPANT;RSVP=TRUE:mailto:guest@xxxx.tld
If you have a look at the
ROLE
, your guest is aNON-PARTICIPANT
. For non-participants (for instance, persons who just want to know about the event), it makes no sense to send RSVP (they won’t attend anyway).This means that your calendar app has sent
Attendees.ATTENDEE_RELATIONSHIP
toAttendees.RELATIONSHIP_NONE
. Can you select a guest role in your calendar app?My observations:
- Samsung S Planner doesn’t set
Attendees.ATTENDEE_TYPE
toAttendees.TYPE_REQUIRED
, while - Etar (materialized AOSP calendar) sets
Attendees.TYPE_REQUIRED
.
Could you try what happens with Etar?
- According to the code,
-
This means that your calendar app has sent Attendees.ATTENDEE_RELATIONSHIP to Attendees.RELATIONSHIP_NONE. Can you select a guest role in your calendar app?
I’m using the stock calendar app that comes with android (Google calendar version 5.2.5-106395923-release). I can’t select the guest role (at least I’m not aware of how to do this and I searched for it).
Could you try what happens with Etar?
I just tested with Etar and I get similar output you get (taken from the owncloud server database):
ATTENDEE;CN=guest@myserver.de;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;RSVP=TRUE:\r+ mailto:guest@myserver.de\r
So it looks good (
RSVP=TRUE
). TheROLE
differs but this shouldn’t be a problem (correct?). I’ll test with the DAVdroid debug log asap but the database entry puts the blame on the Google Calendar app.
Do you have any idea why Google would set guests toNON-PARTICIPANT
and more importantly on how to fix it (open bug report?)?Owncloud still doesn’t sent emails (and yes, the “email test function” works just fine) but I’ll try to investigate further on the owncloud side now. The logs look good in the sense that there are no errors and bad in the sense that there is no mention at all about the invite email.
Do you know anyone who has this future working with onwcloud (+ DAVdroid)?
Thanks for this great support!
-
@maximilian said:
I’m using the stock calendar app that comes with android (Google calendar version 5.2.5-106395923-release). I can’t select the guest role (at least I’m not aware of how to do this and I searched for it).
As far as I know, there’s no plain “Android”. Which brand of Android do you use? CyanogenMod? Firmware of a specific manufacturer? Manufacturers often patch around in such things.
So it looks good (
RSVP=TRUE
). TheROLE
differs but this shouldn’t be a problem (correct?). I’ll test with the DAVdroid debug log asap but the database entry puts the blame on the Google Calendar app.The strange thing is that Etar is the AOSP calendar, just with Material look. So maybe you’re really using a manufacturer-patched version of Google Calendar?
Do you have any idea why Google would set guests to
NON-PARTICIPANT
and more importantly on how to fix it (open bug report?)?You could have a look into the source code of AOSP calendar to find more information.
Owncloud still doesn’t sent emails (and yes, the “email test function” works just fine) but I’ll try to investigate further on the owncloud side now. The logs look good in the sense that there are no errors and bad in the sense that there is no mention at all about the invite email.
I don’t know, but I guess that OwnCloud doesn’t support CalDAV Scheduling.
-
@rfc2822
Sorry for replying this late.As far as I know, there’s no plain “Android”. Which brand of Android do you use? CyanogenMod? Firmware of a specific manufacturer? Manufacturers often patch around in such things.
I’m using a Oneplus 2 with OxygenOS 2.1.1 (Android 5.1.1). The calendar app is installed (not sure) and updated (sure) through the Play Store.
I just got the debug log from DAVdroid (event created using Etar):[trace] ATTENDEE;CN=Guest;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;RSVP=TR [trace] UE:mailto:guest@myserver.de
The
ROLE
is still different from yours, but that shouldn’t make a difference, right?You could have a look into the source code of AOSP calendar to find more information.
I cloned the repository and grepd for it (
grep -Ri role .
) but I got no hits…I don’t know, but I guess that OwnCloud doesn’t support CalDAV Scheduling.
If I understand it correctly, then owncloud uses sabre for the calendar - and they say on their website they support scheduling. I have verified that my owncloud installation has the required settings…
From my point of view the issue is now resolved at the DAVdroid end: I know that I can’t use the Google Calendar App (=> use Etar) and I need to fix my owncloud / switch to something else (do you have recommendations?).
I tried to edit the first post to add the
solved
tag but I’m not allowed to do that. Can you please mark it solved?Thank you very much for all the help! I really appreciate it!
-
@maximilian said:
The
ROLE
is still different from yours, but that shouldn’t make a difference, right?Right, as long it’s a role where RSVP makes sense.
You could have a look into the source code of AOSP calendar to find more information.
I cloned the repository and grepd for it (grep -Ri role .
) but I got no hits…In Android terms, it’s called
ATTENDEE_TYPE
(see SDK docs).I don’t know, but I guess that OwnCloud doesn’t support CalDAV Scheduling.
If I understand it correctly, then owncloud uses sabre for the calendar - and they say on their website they support scheduling. I have verified that my owncloud installation has the required settings…
As far as I know, OwnCloud is based on SabreDAV, but it has a special way for many things. Maybe CalDAV Scheduling is just not enabled in OwnCloud for some reasons?
From my point of view the issue is now resolved at the DAVdroid end: I know that I can’t use the Google Calendar App (=> use Etar) and I need to fix my owncloud / switch to something else (do you have recommendations?).
I still didn’t find anything that’s matching all my needs
https://davdroid.bitfire.at/configuration may be a good starting point. If it’s about feature completeness, I think Contacts & Calendar Server may be interesting, but I don’t have experience with it.