DEV: ensure 'post_number' is an integer on the server

DEV: ensure ‘post_number’ is an integer on the server

diff --git a/assets/javascripts/initializers/discourse-calendar.js.es6 b/assets/javascripts/initializers/discourse-calendar.js.es6
index 0c19529..9922fca 100644
--- a/assets/javascripts/initializers/discourse-calendar.js.es6
+++ b/assets/javascripts/initializers/discourse-calendar.js.es6
@@ -248,7 +248,7 @@ function initializeDiscourseCalendar(api) {
       event.extendedProps = { htmlContent: detail.message };
 
       if (detail.post_number) {
-        event.extendedProps.postNumber = parseInt(detail.post_number, 10);
+        event.extendedProps.postNumber = detail.post_number;
       } else {
         event.classNames = ["holiday"];
       }
diff --git a/plugin.rb b/plugin.rb
index f163991..54f8912 100644
--- a/plugin.rb
+++ b/plugin.rb
@@ -183,14 +183,15 @@ after_initialize do
 
     details = post_custom_fields[DiscourseCalendar::CALENDAR_DETAILS_CUSTOM_FIELD]
     Array(details).each do |post_number, (message, from, to, username, recurring)|
-      result << {
-        post_number: post_number,
+      detail = {
+        post_number: post_number.to_i,
         message: message,
         from: from,
         to: to,
         username: username,
-        recurring: recurring,
       }
+      detail[:recurring] = recurring if recurring
+      result << detail
     end
 
     holidays = post_custom_fields[DiscourseCalendar::CALENDAR_HOLIDAYS_CUSTOM_FIELD]

GitHub sha: fcc2c011