Calendar/get omits some Calendar properties when properties is omitted or null

Issue Description

Calendar/get omits some Calendar properties when properties is omitted or null.

For example, defaultAlertsWithTime and defaultAlertsWithoutTime are only returned when explicitly requested.

The Calendars specification defines Calendar/get as:

“This is a standard “/get” method as described in Section 5.1 of [RFC8620].”

RFC 8620 §5.1 says:

“If null, all properties of the object are returned.”

Expected Behavior

With no properties argument, all Calendar properties should be returned, including defaultAlertsWithTime and defaultAlertsWithoutTime.

Actual Behavior

A request such as:

["Calendar/get", {
  "accountId": "account1",
  "ids": ["calendar1"]
}, "0"]

omits the default alert properties.

Explicitly requesting them:

["Calendar/get", {
  "accountId": "account1",
  "ids": ["calendar1"],
  "properties": [
    "id",
    "defaultAlertsWithTime",
    "defaultAlertsWithoutTime"
  ]
}, "0"]

returns the configured value correctly, e.g.:

"defaultAlertsWithTime": {
  "alert1": {
    "@type": "Alert",
    "action": "display",
    "trigger": {
      "@type": "OffsetTrigger",
      "relativeTo": "start",
      "offset": "-PT10M"
    }
  }
}

Reproduction Steps

  1. Configure a Calendar with a default alert.
  2. Call Calendar/get without properties; observe that the default alert properties are absent.
  3. Repeat while explicitly requesting defaultAlertsWithTime and defaultAlertsWithoutTime; observe that they are returned.

Relevant Log Output

No error is logged; the request succeeds normally. The issue is limited to the returned property set.

Stalwart Version

v0.16.x

Installation Method

Built from source

Database Backend

RocksDB

Blob Storage

RocksDB

Search Engine

Internal

Directory Backend

Internal

I have reviewed the documentation and FAQ and confirm that my issue is NOT addressed there.

on

I have searched this support forum (open and closed topics) and confirm this is not a duplicate.

on

I understand that topics in this category are triaged by a bot first but a human reply will follow up. If I’d prefer a human-only reply, I’ll add the no-ai tag to my topic.

on

Confirmed by inspecting the source: calendar_get’s default property list (used when the request omits properties) only includes Id, Name, Description, Color, TimeZone, SortOrder, IsDefault, IsSubscribed, MyRights. It does not include IsVisible, IncludeInAvailability, DefaultAlertsWithTime, or DefaultAlertsWithoutTime, even though the get.rs handler is fully capable of returning them when explicitly requested. So your report is accurate: those properties are simply left out of the implicit “return all properties” default set, rather than there being some other filtering logic at play.

This matches your reproduction exactly, since RFC 8620 requires null/omitted properties to return all object properties, and the current default list is incomplete relative to the full Calendar object schema.

A human maintainer will need to confirm whether the fix is to add the missing properties to that default list.

This is an automated reply from the Stalwart Help Bot. Other community members may follow up if this answer is incomplete or wrong.

Fixed in v0.16.21 (yet to be released).