summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Geier <geier@lostpackets.de>2023-06-17 17:53:18 +0200
committerChristian Geier <geier@lostpackets.de>2023-11-15 21:06:01 +0100
commitf94551dbbdbbe1373e0296cdb8cb7957c2d0da1f (patch)
treed38e78815a1f362506379e79fa784f5cb5c807d7
parenta57156ccc98781fd32b2774432d37d53f43a9d7a (diff)
config: accept email address for each calendar
-rw-r--r--khal/settings/khal.spec4
-rw-r--r--tests/configs/small.conf1
-rw-r--r--tests/settings_test.py8
3 files changed, 9 insertions, 4 deletions
diff --git a/khal/settings/khal.spec b/khal/settings/khal.spec
index dc9ae1a2..8bc5d2f8 100644
--- a/khal/settings/khal.spec
+++ b/khal/settings/khal.spec
@@ -71,6 +71,10 @@ readonly = boolean(default=False)
# *calendars* subsection will be used.
type = option('calendar', 'birthdays', 'discover', default='calendar')
+# The email address associated with this account. For now it is only used to
+# check what participation status ("PARTSTAT") belongs to the user.
+address = string(default='')
+
[sqlite]
# khal stores its internal caching database here, by default this will be in the *$XDG_DATA_HOME/khal/khal.db* (this will most likely be *~/.local/share/khal/khal.db*).
path = expand_db_path(default=None)
diff --git a/tests/configs/small.conf b/tests/configs/small.conf
index 9981df2f..07a65329 100644
--- a/tests/configs/small.conf
+++ b/tests/configs/small.conf
@@ -8,3 +8,4 @@
[[work]]
path = ~/.calendars/work/
readonly = True
+ address = user@example.com
diff --git a/tests/settings_test.py b/tests/settings_test.py
index 290f1aef..3428ebfe 100644
--- a/tests/settings_test.py
+++ b/tests/settings_test.py
@@ -41,9 +41,9 @@ class TestSettings:
comp_config = {
'calendars': {
'home': {'path': os.path.expanduser('~/.calendars/home/'),
- 'readonly': False, 'color': None, 'priority': 10, 'type': 'calendar'},
+ 'readonly': False, 'color': None, 'priority': 10, 'type': 'calendar', 'address': ''},
'work': {'path': os.path.expanduser('~/.calendars/work/'),
- 'readonly': False, 'color': None, 'priority': 10, 'type': 'calendar'},
+ 'readonly': False, 'color': None, 'priority': 10, 'type': 'calendar', 'address': ''},
},
'sqlite': {'path': os.path.expanduser('~/.local/share/khal/khal.db')},
'locale': LOCALE_BERLIN,
@@ -81,10 +81,10 @@ class TestSettings:
'calendars': {
'home': {'path': os.path.expanduser('~/.calendars/home/'),
'color': 'dark green', 'readonly': False, 'priority': 20,
- 'type': 'calendar'},
+ 'type': 'calendar', 'address': ''},
'work': {'path': os.path.expanduser('~/.calendars/work/'),
'readonly': True, 'color': None, 'priority': 10,
- 'type': 'calendar'}},
+ 'type': 'calendar', 'address': 'user@example.com'}},
'sqlite': {'path': os.path.expanduser('~/.local/share/khal/khal.db')},
'locale': {
'local_timezone': get_localzone(),