Bug 1496223 - Suppress error message about missing response mode if no attendees are involved at all. r=philipp
authorMakeMyDay <makemyday@gmx-topmail.de>
Wed, 03 Oct 2018 22:55:37 +0200
changeset 33414 952e3c43da389b749dfc7bfb84d5f6df84bbb699
parent 33413 9d0f37068236caf4bed8a0773b0f70b35a58da12
child 33415 a8bb4bbd32e6ddd33c35a50d5d734cb592eaf6f6
push id387
push userclokep@gmail.com
push dateMon, 10 Dec 2018 21:30:47 +0000
reviewersphilipp
bugs1496223
Bug 1496223 - Suppress error message about missing response mode if no attendees are involved at all. r=philipp
calendar/base/modules/utils/calItipUtils.jsm
--- a/calendar/base/modules/utils/calItipUtils.jsm
+++ b/calendar/base/modules/utils/calItipUtils.jsm
@@ -746,19 +746,22 @@ var calitip = {
                 case Ci.calIItipItem.USER:
                     autoResponse.mode = aExtResponse.responseMode;
                     break;
                 default:
                     cal.ERROR("cal.itip.checkAndSend(): Invalid value " + aExtResponse.responseMode +
                               " provided for responseMode attribute in argument aExtResponse." +
                               " Falling back to USER mode.\r\n" + cal.STACK(20));
             }
-        } else {
-            // let's log something useful to notify addon developers or find any missing pieces in
-            // the conversions
+        } else if ((aOriginalItem && aOriginalItem.getAttendees({}).length) ||
+                   aItem.getAttendees({}).length) {
+            // let's log something useful to notify addon developers or find any
+            // missing pieces in the conversions if the current or original item
+            // has attendees - the latter is to prevent logging if creating events
+            // by click and slide in day or week views
             cal.LOG("cal.itip.checkAndSend: no response mode provided, " +
                     "falling back to USER mode.\r\n" + cal.STACK(20));
         }
         if (autoResponse.mode == Ci.calIItipItem.NONE) {
             // we stop here and don't send anything if the user opted out before
             return;
         }