These headers are important for riot to be able to use pan's search
endpoint instead of the default Homeserver endpoint. It fails to search
using pan with CORS errors.
Fetching the full state with the initial sync is important because we
don't store any room state locally.
Since we don't store any sync token we are getting the full state
anyways. But once we do this change will be crucial for encryption to
work correctly.
This patch adds the ability to fetch the whole room history. Note that
this is still incomplete as it not fetch the whole history if it gets
interrupted.
Another deficiency is that it always tries to start fetching room
history after a restart even though we know that it doesn't need to do
so.
Tantivy allows search results to be ordered by arbitrary index fields as
long as they are a fast field and have the FastValue trait implemented.
This trait is only for u64 and i64 fields implemented.
To order the the search results by recency we need to add a unsigned
field that stores the server timestamp of the message.
This patch adds support for the Matrix search API endpoint.
Events are stored in the pan sqlite database while the indexing is
handled by tanvity.
An tantivy index is created for each pan user. Currently only ordering
by ranking is supported, and all the search options are ignored for now.
This patch changes the way clients register to pantalaimon. If there is
already a pan client running for a given user ID clients can now avoid
logging in.
Pantalaimon checks with the homeserver if the access token
is valid and for a user that we already have a pan client running.
This also removes the need to remember access tokens that don't belong
to a pan client.
This partially fixes#14.