private Article article(Query q, boolean head, boolean body) {
Mailbox.Iterator it = current.iterator(q);
if (!it.next()) return null;
- //Message m = body ? it.cur() : it.head();
- Message m = it.cur(); // FIXME
- return new Article(m.messageid, it.num(), m);
+ try {
+ Message m = body ? it.cur() : Message.newMessage(new Stream(it.head() + "\r\n"));
+ //Message m = it.cur(); // FIXME
+ return new Article(m.messageid, it.num(), m);
+ } catch (Exception e) { return null; }
}
public Group[] list() { return list(root, ""); }
private Group[] list(Mailbox who, String prefix) {