mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-12-15 21:10:22 +01:00
debug: still broken... more debug logs
This commit is contained in:
@@ -10,8 +10,6 @@ const activitypub = module.parent.exports;
|
||||
const Feps = module.exports;
|
||||
|
||||
Feps.announce = async function announce(id, activity) {
|
||||
activity = structuredClone(activity);
|
||||
|
||||
let localId;
|
||||
if (String(id).startsWith(nconf.get('url'))) {
|
||||
({ id: localId } = await activitypub.helpers.resolveLocalId(id));
|
||||
@@ -57,6 +55,7 @@ Feps.announce = async function announce(id, activity) {
|
||||
|
||||
if (activity.type === 'Create') {
|
||||
const isMain = await posts.isMain(localId || id);
|
||||
console.log('plain announce', activity);
|
||||
if (isMain) {
|
||||
activitypub.helpers.log(`[activitypub/inbox.announce(1b12)] Announcing plain object (${activity.id}) to followers of cid ${cid} and ${relays.length} relays`);
|
||||
await activitypub.send('cid', localCid ? cid : 0, targets, {
|
||||
@@ -71,6 +70,7 @@ Feps.announce = async function announce(id, activity) {
|
||||
}
|
||||
|
||||
activitypub.helpers.log(`[activitypub/inbox.announce(1b12)] Announcing ${activity.type} (${activity.id}) to followers of cid ${cid} and ${relays.length} relays`);
|
||||
console.log('activity announce', activity);
|
||||
await activitypub.send('cid', localCid ? cid : 0, targets, {
|
||||
id: `${nconf.get('url')}/post/${encodeURIComponent(id)}#activity/announce/${now}`,
|
||||
type: 'Announce',
|
||||
|
||||
Reference in New Issue
Block a user