What is destmsg? #280
-
OR ... what is this message telling us?
This seems to occur when a filter is run on a Search folder, not a "real" folder. Sometimes filters don't work at all in these folders, which I believe is a Tb issue that I'll look at later. For now, what is "destmsg"? TY |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 1 reply
-
it is a listener for moved or copied messages. destmsgs is an (probably optional) array of destination messages. I tink usually we only have 3 params, isMoved flag, the array of messages to be moved and target folder. here is the code // https://mxr.mozilla.org/addons/source/3376/chrome/content/mailclassifier/js/main.js#91
quickFilters.MsgFolderListener = {
qfInstance: quickFilters,
/**
* Event fired after message was moved or copied
* @param {boolean} isMoved
* @param {nsIArray} aSrcMsgs Array of Messages
* @param {nsIMsgFolder} targetFolder
* @param {nsIArray} aDestMsgs Array of Messages
*/
msgsMoveCopyCompleted: function(isMoved, aSrcMsgs, targetFolder, aDestMsgs) {
let qF = quickFilters ? quickFilters : this.qfInstance;
let isMoveDebug = qF.Preferences.isDebugOption("msgMove"),
isDebugDetail = false;
qF.Util.logDebugOptional("listeners", `MsgFolderListener.msgsMoveCopyCompleted()\n ${aSrcMsgs[0].folder.prettyName} ${targetFolder.prettyName} ${aDestMsgs && aDestMsgs.length ? aDestMsgs[0].folder.prettyName : "no destmsg!"}`);
if (isMoveDebug) { |
Beta Was this translation helpful? Give feedback.
-
note that you can not have a search folder as a destination of a manual move of mails, you cannot move mails into a search folder. And I am not sure whether messages appearing as part of a search because they start matching the criteria of the search terms could technically be termed as "moving messages" because they are not moved to this folder deliberately. they may well be moved to a real folder and then fit the criteria but their existence is not owed to a search folder target but to a move to a real folder (or adding a tag or other modification). Should the later trigger the event listener we should probably ignore it if the target folder is a search folder / virtual folder. I certainly think it should NOT trigger the assistant, only primary arrival in a real folder or changes like added tags should trigger the filter assistant. |
Beta Was this translation helpful? Give feedback.
-
by the way, this question belongs to quickFilters, but that has no discussion area which prohibits transferring it to the other repo, so I will just tag it as such. |
Beta Was this translation helpful? Give feedback.
-
Just a minor not on closing tickets - it is alright with this one as it is so minor and doesn‘t really affect many users, but with other things like obvious bugs and new features i like to keep my issues open until i release an official version on ATN. Partly because it is part of my workflow but mainly so that users who have the same issue see that it‘s actively worked on and so duplicates are also avoided. Closed issues just vanish from the main issues page because it‘s by default filtered to only show open ones. |
Beta Was this translation helpful? Give feedback.
-
PS: I also want to make sure that any patches that I post in an issue make it into the next official Addon release, so do consider it closed once the code is “in production” = released for everyone to use. |
Beta Was this translation helpful? Give feedback.
it is a listener for moved or copied messages. destmsgs is an (probably optional) array of destination messages. I tink usually we only have 3 params, isMoved flag, the array of messages to be moved and target folder.
here is the code