-1

我正在使用下面的代码并期望检索属于同一线程的所有消息。但是,它始终只返回选定的消息详细信息。该消息已经有一个小时了,因此应该进行索引。我也在多个线程上尝试了这个,但结果相同。请告知这里有什么问题

this.query =
Gloda.getMessageCollectionForHeaders([msgHdr], {
onItemsAdded: function (aItems) {},
onItemsModified: function () {},
onItemsRemoved: function () {},
onQueryCompleted: function (aCollection) {
add("\t\t\t/---------------------------\\\n");
add("\t\t\t| vik Gloda results |\n");
add("\t\t\t\\---------------------------/\n\n");

add("Gloda found "+aCollection.items.length+" items\n");
// Iterator over the messages Gloda found...
for each (let [i, glodaMsg] in Iterator(aCollection.items)) {
add("This message is from: "+glodaMsg.from+"\n");
add("This message is to: "+glodaMsg.to+"\n");
add("This message is from lists: "+glodaMsg.mailingLists+"\n");

}
},
}, true)
;
4

1 回答 1

0

请参阅https://developer.mozilla.org/en-US/docs/Mozilla/Thunderbird/Creating_a_Gloda_message_query?redirectlocale=en-US&redirectslug=Thunderbird%2FCreating_a_Gloda_message_query的最后一段;在您的情况下,您需要通过执行 glodaMsg.conversation.getMessageCollection 来启动第二个查询。https://developer.mozilla.org/en-US/docs/Mozilla/Thunderbird/Gloda_examples?redirectlocale=en-US&redirectslug=Thunderbird%2FGloda_examples有一个更大的例子。

于 2013-10-15T12:47:58.260 回答