feat: replicate threads through the observation log (#45)
feat: replicate threads through the observation log (#45) Co-authored-by: David Gwilliam <dhgwilliam@gmail.com> Co-committed-by: David Gwilliam <dhgwilliam@gmail.com>
This commit was merged in pull request #45.
This commit is contained in:
@@ -19,5 +19,12 @@ func Reconcile(kdb *db.KnoxDB) (int, int, error) {
|
||||
if err != nil {
|
||||
return 0, 0, fmt.Errorf("auto-thread: %w", err)
|
||||
}
|
||||
// Replicated threads are applied last: they carry authored titles and
|
||||
// motivations, which must win over anything the heuristic just derived.
|
||||
if applied, err := kdb.ProjectThreads(); err != nil {
|
||||
return created, linked, fmt.Errorf("project threads: %w", err)
|
||||
} else if applied > 0 {
|
||||
created += applied
|
||||
}
|
||||
return created, linked, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user