linagora / tmail-backend

GNU Affero General Public License v3.0
41 stars 22 forks source link

[EPIC] Setting extension for TeamMail #630

Closed chibenwa closed 1 year ago

chibenwa commented 1 year ago

Why

Enable a client to store per-user setting on the backend side.

Capability name: com:linagora:params:setting will unlock the Settings object (singleton), and with it the Settings/get and Settings/set methods.

Settings is a free floating String[String] map being set by the client. Our extension should include a registry of known usage from TeamMail mobile app, and usage.

Use cases

Example

{
  "sessionState": "${SESSION_STATE.value}",
  "methodResponses": [[
    "Settigns/get",
    {
      "accountId": "29883977c13473ae7cb7678ef767cbfbaffc8a44a6e463d971d23a65c1dc4af6",
      "state": "${INSTANCE.value}",
      "list": [
        {
          "id":"singleton",
          "tdrive.attachment.import.enabled": "true",
          "knowledgegraph.collection.enabled": "true",
          "firebase.enabled": "true",
          "timezone": "UTC+7",
          "trash.cleanup.enabled": "true",
          "trash.cleanup.period": "weekly",
          "spam.cleanup.enabled": "true",
          "spam.cleanup.period": "monthly",
          "inbox.archival.enabled": "true",
          "inbox.archival.period": "monthly",
          "inbox.archival.format": "yearly",
          "appearance.theme": "dark",
          "language": "fr",
          "read.receipts.always": "false",
          "warnings.spam.banner": "true",
          "warnings.attachment.reminder": "false",
          "warnings.email.deletion": "true"
        }
      ],
      "notFound": []
    },
    "c1"]]
}

Cassandra storage

PK: username

C: Map[String, String]

quantranhong1999 commented 1 year ago
chibenwa commented 1 year ago

Please team:

quantranhong1999 commented 1 year ago

-> Draft an ADR -> Draft a spec

I just created these two tickets (without content yet) with high priority in TODO column, so the team does not forget.

Arsnael commented 1 year ago

I would change com:linagora:params:setting to com:linagora:params:jmap:settings

Arsnael commented 1 year ago

cc @hoangdat @dieptran88