mirror of
https://github.com/discourse/discourse.git
synced 2024-11-27 11:20:57 -06:00
22208836c5
We don't need no stinkin' denormalization! This commit ignores the topic_id column on bookmarks, to be deleted at a later date. We don't really need this column and it's better to rely on the post.topic_id as the canonical topic_id for bookmarks, then we don't need to remember to update both columns if the bookmarked post moves to another topic.
16 lines
662 B
Plaintext
16 lines
662 B
Plaintext
BEGIN:VCALENDAR
|
|
VERSION:2.0
|
|
PRODID:-//Discourse//<%= Discourse.current_hostname %>//<%= Discourse.full_version %>//EN
|
|
<% @bookmark_reminders.each do |bookmark| %>
|
|
BEGIN:VEVENT
|
|
UID:bookmark_reminder_#<%= bookmark.id %>@<%= Discourse.current_hostname %>
|
|
DTSTAMP:<%= bookmark.updated_at.strftime(I18n.t("datetime_formats.formats.calendar_ics")) %>
|
|
DTSTART:<%= bookmark.reminder_at_ics %>
|
|
DTEND:<%= bookmark.reminder_at_ics(offset: 1.hour) %>
|
|
SUMMARY:<%= bookmark.name.presence || bookmark.topic.title %>
|
|
DESCRIPTION:<%= Discourse.base_url %>/t/-/<%= bookmark.topic_id %>
|
|
URL:<%= Discourse.base_url %>/t/-/<%= bookmark.topic_id %>
|
|
END:VEVENT
|
|
<% end %>
|
|
END:VCALENDAR
|