Bug 498700 - imip bar is not displayed, error "GetLoadedMessage is not defined" in imip-bar.js (regression). r=philipp
authorMartin Schroeder <mschroeder@mozilla.x-home.org>
Sun, 21 Jun 2009 11:40:05 +0200
changeset 2902 963ded786cb7ece231cb490664fda7290c274e2e
parent 2901 67ab9ddecfbeff1778a33424246ff6ed6f822799
child 2903 93854d46f3a9f587a719a40dd56dfa0dd0db91b6
push idunknown
push userunknown
push dateunknown
reviewersphilipp
bugs498700
Bug 498700 - imip bar is not displayed, error "GetLoadedMessage is not defined" in imip-bar.js (regression). r=philipp
calendar/lightning/content/imip-bar.js
--- a/calendar/lightning/content/imip-bar.js
+++ b/calendar/lightning/content/imip-bar.js
@@ -17,16 +17,17 @@
  * Portions created by the Initial Developer are Copyright (C) 2006
  * the Initial Developer. All Rights Reserved.
  *
  * Contributor(s):
  *   Clint Talbert <ctalbert.moz@gmail.com>
  *   Matthew Willis <lilmatt@mozilla.com>
  *   Philipp Kewisch <mozilla@kewis.ch>
  *   Daniel Boelzle <daniel.boelzle@sun.com>
+ *   Martin Schroeder <mschroeder@mozilla.x-home.org>
  *
  * Alternatively, the contents of this file may be used under the terms of
  * either the GNU General Public License Version 2 or later (the "GPL"), or
  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  * in which case the provisions of the GPL or the LGPL are applicable instead
  * of those above. If you wish to allow use of your version of this file only
  * under the terms of either the GPL or the LGPL, and not to allow others to
  * use your version of this file under the terms of the MPL, indicate your
@@ -41,18 +42,17 @@ Components.utils.import("resource://cale
 Components.utils.import("resource://calendar/modules/calItipUtils.jsm");
 
 /**
  * This bar lives inside the message window.
  * Its lifetime is the lifetime of the main thunderbird message window.
  */
 
 function ltnGetMsgRecipient() {
-    var msgURI = GetLoadedMessage();
-    var msgHdr = messenger.msgHdrFromURI(msgURI);
+    let msgHdr = gMessageDisplay.displayedMessage;
     if (!msgHdr) {
         return null;
     }
 
     var identities;
     if (msgHdr.accountKey) {
         // First, check if the message has an account key. If so, we can use the
         // account identities to find the correct recipient
@@ -148,17 +148,17 @@ const ltnOnItipItem = {
 
             // We are only called upon receipt of an invite, so ensure that isSend
             // is false.
             itipItem.isSend = false;
 
             // XXX Get these from preferences
             itipItem.autoResponse = Components.interfaces.calIItipItem.USER;
 
-            let imipMethod = messenger.msgHdrFromURI(GetLoadedMessage()).getStringProperty("imip_method");
+            let imipMethod = gMessageDisplay.displayedMessage.getStringProperty("imip_method");
             if (imipMethod && imipMethod.length != 0 && imipMethod.toLowerCase() != "nomethod") {
                 itipItem.receivedMethod = imipMethod.toUpperCase();
             } else { // There is no METHOD in the content-type header (spec violation).
                      // Fall back to using the one from the itipItem's ICS.
                 imipMethod = itipItem.receivedMethod;
             }
             cal.LOG("iTIP method: " + imipMethod);