[Project_owners] OnStopRunningUrl not fired when msgService.CopyMessage() news post

Niko Berger niko.berger at corinis.com
Wed Apr 20 16:02:12 EDT 2005

Hi Pawel,
in your case I would use aCopyListener to trigger the finish, not 
aUrlListener. From what I found out, the UrlListener is only triggered 
for internal url processing. The CopyListener is triggered when 
everything is done.
Pawel Krzesniak wrote:

>In the code:
>  var messenger =
>    .QueryInterface(Components.interfaces.nsIMessenger);
>  var msgService = messenger.messageServiceFromURI(uri);
>  msgService.CopyMessage(
>      uri,
>      aCopyListener,
>      false,      //aMoveMessage
>      aUrlListener,
>      null, // msgWindow,
>      newURI);
>I'm doing some things after message is copied in
>aUrlListener.OnStopRunningUrl() handler.
>With messages located on IMAP or POP3 account everything works --
>OnStopRunningUrl and OnStartRunningUrl are fired. Also it used to work
>with NNTP posts. Some time ago user of my extension noted, that
>extension stoped working with NNTP messages. And I don't know why.
>Why functions of UrlListener are not invoked when copying news message?
>Is this a bug? or feature?
>Why behavior of msgService.CopyMessage() for different type of messages
>is different?
>Thanks for help,

More information about the Project_owners mailing list