我正在使用以下代码并期望检索属于同一线程的所有消息。但是,它始终只返回选定的消息详细信息。该消息已经过了一个小时,因此应该完成索引。我也试过多个线程,但结果相同。请告知这里错了什么
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)
;
答案 0 :(得分: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有一个更大的例子。