fix bug #23249. prepopulate the address widget the newsgroup name (not the full uri). also, if they had a news server selected, treat this like a normal "To:" compose.

This commit is contained in:
sspitzer%netscape.com 2000-01-11 09:51:28 +00:00
Родитель 26766e6526
Коммит f4005c3832
1 изменённых файлов: 9 добавлений и 2 удалений

Просмотреть файл

@ -89,7 +89,14 @@ function ComposeMessage(type, format) //type is a nsIMsgCompType and format is a
if (type == msgComposeType.New) {
if (server.type == "nntp") {
type = msgComposeType.NewsPost;
newsgroup = uri;
// from the uri, get the newsgroup name
var resource = RDF.GetResource(uri);
var msgfolder = resource.QueryInterface(Components.interfaces.nsIMsgFolder);
if (msgfolder.isServer)
newsgroup = "";
else
newsgroup = msgfolder.name;
}
}
// dump("server = " + server + "\n");
@ -125,7 +132,7 @@ function ComposeMessage(type, format) //type is a nsIMsgCompType and format is a
}
else if (type == msgComposeType.NewsPost)
{
//dump("OpenComposeWindow with " + identity + " and " + newsgroup + "\n");
dump("OpenComposeWindow with " + identity + " and " + newsgroup + "\n");
msgComposeService.OpenComposeWindow(null, newsgroup, type, format, identity);
return;
}