# File lib/sup/xapian_index.rb, line 77
  def build_message id
    entry = synchronize { get_entry id }
    return unless entry

    source = SourceManager[entry[:source_id]]
    raise "invalid source #{entry[:source_id]}" unless source

    m = Message.new :source => source, :source_info => entry[:source_info],
                    :labels => entry[:labels], :snippet => entry[:snippet]

    mk_person = lambda { |x| Person.new(*x.reverse!) }
    entry[:from] = mk_person[entry[:from]]
    entry[:to].map!(&mk_person)
    entry[:cc].map!(&mk_person)
    entry[:bcc].map!(&mk_person)

    m.load_from_index! entry
    m
  end