addDocument method
Register a document
Implementation
@override
Future<void> addDocument(String documentId, {PeerId? author}) async {
if (await hasDocument(documentId)) {
return;
}
// Opened now rather than on the first read, so a document that was just
// added is already following its storage when the first change lands —
// and before the catalog, because a catalog that stores identities would
// mint one first, and a stored id always beats the `author` handed in.
await _openDocument(documentId, author: author);
await _catalog.add(documentId);
}