We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
True personal Agenda ICal Feed
### Problem
I believe it is annoying that when exporting the Personal iCal Feed to the agenda, you get the events your registered for + the open events + the events with optional registration. In practice this is very annoying as you don't want all these open events you might not go to in your agenda.

### Solution
That is why I suggest:
- Creating a 3rd button "iCal feed (personal)", which exports an iCal feed only containing the events you actually registered for.
- Renaming the current "iCal feed personal" to "iCal feed personal + open events"

### Motivation
A better user experience 

### Describe alternatives you've considered
If this is not possible, I would consider adding an "add to agenda" button to the  event pages so you can add events to your agenda individually.


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `website/events/feeds.py`
Content:
```
1 """The feeds defined by the events package."""
2 from django.conf import settings
3 from django.db.models.query_utils import Q
4 from django.urls import reverse
5 from django.utils.translation import activate
6 from django.utils.translation import gettext as _
7 from django_ical.views import ICalFeed
8 
9 from events.models import Event, FeedToken
10 
11 
12 class EventFeed(ICalFeed):
13     """Output an iCal feed containing all published events."""
14 
15     def __init__(self, lang="en"):
16         super().__init__()
17         self.lang = lang
18         self.user = None
19 
20     def __call__(self, request, *args, **kwargs):
21         if "u" in request.GET:
22             self.user = FeedToken.get_member(request.GET["u"])
23         else:
24             self.user = None
25 
26         return super().__call__(request, args, kwargs)
27 
28     def product_id(self):
29         return f"-//{settings.SITE_DOMAIN}//EventCalendar//{self.lang.upper()}"
30 
31     def file_name(self):
32         return f"thalia_{self.lang}.ics"
33 
34     def title(self):
35         activate(self.lang)
36         return _("Study Association Thalia event calendar")
37 
38     def items(self):
39         query = Q(published=True)
40 
41         if self.user:
42             query &= Q(registration_start__isnull=True) | (
43                 Q(eventregistration__member=self.user)
44                 & Q(eventregistration__date_cancelled=None)
45             )
46 
47         return Event.objects.filter(query).order_by("-start")
48 
49     def item_title(self, item):
50         return item.title
51 
52     def item_description(self, item):
53         return f'{item.description} <a href="' f'{self.item_link(item)}">Website</a>'
54 
55     def item_start_datetime(self, item):
56         return item.start
57 
58     def item_end_datetime(self, item):
59         return item.end
60 
61     def item_link(self, item):
62         return settings.BASE_URL + reverse("events:event", kwargs={"pk": item.id})
63 
64     def item_location(self, item):
65         return f"{item.location} - {item.map_location}"
66
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/website/events/feeds.py b/website/events/feeds.py
--- a/website/events/feeds.py
+++ b/website/events/feeds.py
@@ -39,9 +39,8 @@
         query = Q(published=True)
 
         if self.user:
-            query &= Q(registration_start__isnull=True) | (
-                Q(eventregistration__member=self.user)
-                & Q(eventregistration__date_cancelled=None)
+            query &= Q(eventregistration__member=self.user) & Q(
+                eventregistration__date_cancelled=None
             )
 
         return Event.objects.filter(query).order_by("-start")

{"golden_diff": "diff --git a/website/events/feeds.py b/website/events/feeds.py\n--- a/website/events/feeds.py\n+++ b/website/events/feeds.py\n@@ -39,9 +39,8 @@\n         query = Q(published=True)\n \n         if self.user:\n-            query &= Q(registration_start__isnull=True) | (\n-                Q(eventregistration__member=self.user)\n-                & Q(eventregistration__date_cancelled=None)\n+            query &= Q(eventregistration__member=self.user) & Q(\n+                eventregistration__date_cancelled=None\n             )\n \n         return Event.objects.filter(query).order_by(\"-start\")\n", "issue": "True personal Agenda ICal Feed\n### Problem\r\nI believe it is annoying that when exporting the Personal iCal Feed to the agenda, you get the events your registered for + the open events + the events with optional registration. In practice this is very annoying as you don't want all these open events you might not go to in your agenda.\r\n\r\n### Solution\r\nThat is why I suggest:\r\n- Creating a 3rd button \"iCal feed (personal)\", which exports an iCal feed only containing the events you actually registered for.\r\n- Renaming the current \"iCal feed personal\" to \"iCal feed personal + open events\"\r\n\r\n### Motivation\r\nA better user experience \r\n\r\n### Describe alternatives you've considered\r\nIf this is not possible, I would consider adding an \"add to agenda\" button to the  event pages so you can add events to your agenda individually.\r\n\n", "before_files": [{"content": "\"\"\"The feeds defined by the events package.\"\"\"\nfrom django.conf import settings\nfrom django.db.models.query_utils import Q\nfrom django.urls import reverse\nfrom django.utils.translation import activate\nfrom django.utils.translation import gettext as _\nfrom django_ical.views import ICalFeed\n\nfrom events.models import Event, FeedToken\n\n\nclass EventFeed(ICalFeed):\n    \"\"\"Output an iCal feed containing all published events.\"\"\"\n\n    def __init__(self, lang=\"en\"):\n        super().__init__()\n        self.lang = lang\n        self.user = None\n\n    def __call__(self, request, *args, **kwargs):\n        if \"u\" in request.GET:\n            self.user = FeedToken.get_member(request.GET[\"u\"])\n        else:\n            self.user = None\n\n        return super().__call__(request, args, kwargs)\n\n    def product_id(self):\n        return f\"-//{settings.SITE_DOMAIN}//EventCalendar//{self.lang.upper()}\"\n\n    def file_name(self):\n        return f\"thalia_{self.lang}.ics\"\n\n    def title(self):\n        activate(self.lang)\n        return _(\"Study Association Thalia event calendar\")\n\n    def items(self):\n        query = Q(published=True)\n\n        if self.user:\n            query &= Q(registration_start__isnull=True) | (\n                Q(eventregistration__member=self.user)\n                & Q(eventregistration__date_cancelled=None)\n            )\n\n        return Event.objects.filter(query).order_by(\"-start\")\n\n    def item_title(self, item):\n        return item.title\n\n    def item_description(self, item):\n        return f'{item.description} <a href=\"' f'{self.item_link(item)}\">Website</a>'\n\n    def item_start_datetime(self, item):\n        return item.start\n\n    def item_end_datetime(self, item):\n        return item.end\n\n    def item_link(self, item):\n        return settings.BASE_URL + reverse(\"events:event\", kwargs={\"pk\": item.id})\n\n    def item_location(self, item):\n        return f\"{item.location} - {item.map_location}\"\n", "path": "website/events/feeds.py"}], "after_files": [{"content": "\"\"\"The feeds defined by the events package.\"\"\"\nfrom django.conf import settings\nfrom django.db.models.query_utils import Q\nfrom django.urls import reverse\nfrom django.utils.translation import activate\nfrom django.utils.translation import gettext as _\nfrom django_ical.views import ICalFeed\n\nfrom events.models import Event, FeedToken\n\n\nclass EventFeed(ICalFeed):\n    \"\"\"Output an iCal feed containing all published events.\"\"\"\n\n    def __init__(self, lang=\"en\"):\n        super().__init__()\n        self.lang = lang\n        self.user = None\n\n    def __call__(self, request, *args, **kwargs):\n        if \"u\" in request.GET:\n            self.user = FeedToken.get_member(request.GET[\"u\"])\n        else:\n            self.user = None\n\n        return super().__call__(request, args, kwargs)\n\n    def product_id(self):\n        return f\"-//{settings.SITE_DOMAIN}//EventCalendar//{self.lang.upper()}\"\n\n    def file_name(self):\n        return f\"thalia_{self.lang}.ics\"\n\n    def title(self):\n        activate(self.lang)\n        return _(\"Study Association Thalia event calendar\")\n\n    def items(self):\n        query = Q(published=True)\n\n        if self.user:\n            query &= Q(eventregistration__member=self.user) & Q(\n                eventregistration__date_cancelled=None\n            )\n\n        return Event.objects.filter(query).order_by(\"-start\")\n\n    def item_title(self, item):\n        return item.title\n\n    def item_description(self, item):\n        return f'{item.description} <a href=\"' f'{self.item_link(item)}\">Website</a>'\n\n    def item_start_datetime(self, item):\n        return item.start\n\n    def item_end_datetime(self, item):\n        return item.end\n\n    def item_link(self, item):\n        return settings.BASE_URL + reverse(\"events:event\", kwargs={\"pk\": item.id})\n\n    def item_location(self, item):\n        return f\"{item.location} - {item.map_location}\"\n", "path": "website/events/feeds.py"}]}