mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-30 10:35:55 +01:00
feat: #12695 Topic Synchronization via resolvable context
- Generation of a context collection digest via object ids - Sending of said digest in ETag header - Parsing of digests via If-None-Match header - Update note assertion logic to handle 304 response
This commit is contained in:
@@ -43,7 +43,11 @@ Notes.assert = async (uid, input, options = { skipChecks: false }) => {
|
||||
|
||||
let chain;
|
||||
const context = await activitypub.contexts.get(uid, id);
|
||||
if (context) {
|
||||
if (context.tid) {
|
||||
unlock(id);
|
||||
const { tid } = context;
|
||||
return { tid, count: 0 };
|
||||
} else if (context.context) {
|
||||
chain = Array.from(await activitypub.contexts.getItems(uid, context));
|
||||
} else {
|
||||
// Fall back to inReplyTo traversal
|
||||
|
||||
Reference in New Issue
Block a user