nsMsgCompose stores m_identity when it gets initialised (i.e. the compose window opened). When the user changes the identity, we don't actually update m_identity. This is needed so that when we save the message for sending, we can set the correct identity in the message database (it already gets set in the headers, but we now need it in the db as well). The patch attached fixes this and changes the name of the setSignature function to onIdentityChanged as that is more appropriate for what the function is actually doing.
Comment on attachment 379731 [details] [diff] [review] The fix this does work w/ the other two patches in the activity manager send patch. However, I wonder if we want to move the setting of m_identity to identity earlier in this function, since there may be early returns.
Attachment #379731 - Flags: review?(bienvenu) → review+
Why not just use an attribute nsIMsgIdentity identity?
Also, why not use the identity passed to SendMsg?
(In reply to comment #2) > Why not just use an attribute nsIMsgIdentity identity? That's a possibility, though the Set function would have to do a lot more than set functions do normally. (In reply to comment #3) > Also, why not use the identity passed to SendMsg? We need the identity after the construction of the message is completed - so we need to save it into a member variable. However, I think you may be right, it is possible that SendMsg could be called with a different id to the one saved, and therefore we should be using that one instead.
This patch makes identity an attribute on nsIMsgCompose, and sets the member variable when the identity is changed, or for when SendMsg is called.
Attachment #379852 - Flags: superreview?(neil) → superreview+
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.