Move ActivityPub stuff under activitypub/

This commit is contained in:
Bryan Ashby 2023-01-12 18:49:13 -07:00
parent 67652b18f2
commit 157b90687c
No known key found for this signature in database
GPG Key ID: C2C1B501E4EFD994
9 changed files with 23 additions and 29 deletions

View File

@ -4,13 +4,13 @@ const {
ActivityStreamsContext,
messageBodyToHtml,
selfUrl,
} = require('./activitypub_util');
const { Errors } = require('./enig_error');
const User = require('./user');
const Actor = require('./activitypub_actor');
const { getISOTimestampString } = require('./database');
const UserProps = require('./user_property');
const { postJson } = require('./http_util');
} = require('../activitypub/util');
const { Errors } = require('../enig_error');
const User = require('../user');
const Actor = require('../activitypub/actor');
const { getISOTimestampString } = require('../database');
const UserProps = require('../user_property');
const { postJson } = require('../http_util');
// deps
const async = require('async');

View File

@ -2,22 +2,20 @@
'use strict';
// ENiGMA½
const actorDb = require('./database.js').dbs.actor;
const { Errors } = require('./enig_error.js');
const UserProps = require('./user_property');
const { Errors } = require('../enig_error.js');
const UserProps = require('../user_property');
const {
webFingerProfileUrl,
makeUserUrl,
selfUrl,
isValidLink,
ActivityStreamsContext,
} = require('./activitypub_util');
const Log = require('./logger').log;
const { queryWebFinger } = require('./webfinger');
const EnigAssert = require('./enigma_assert');
} = require('../activitypub/util');
const Log = require('../logger').log;
const { queryWebFinger } = require('../webfinger');
const EnigAssert = require('../enigma_assert');
// deps
const async = require('async');
const _ = require('lodash');
const https = require('https');

View File

@ -1,4 +1,4 @@
const apDb = require('./database').dbs.activitypub;
const apDb = require('../database').dbs.activitypub;
exports.persistToOutbox = persistToOutbox;

View File

@ -2,7 +2,7 @@ const { WellKnownLocations } = require('./servers/content/web');
const User = require('./user');
const { Errors, ErrorReasons } = require('./enig_error');
const UserProps = require('./user_property');
const ActivityPubSettings = require('./activitypub_settings');
const ActivityPubSettings = require('./activitypub/settings');
// deps
const _ = require('lodash');

View File

@ -1,9 +1,9 @@
const Activity = require('../activitypub_activity');
const Activity = require('../activitypub/activity');
const Message = require('../message');
const { MessageScanTossModule } = require('../msg_scan_toss_module');
const { getServer } = require('../listening_server');
const Log = require('../logger').log;
const { persistToOutbox } = require('../activitypub_db');
const { persistToOutbox } = require('../activitypub/db');
// deps
const async = require('async');

View File

@ -4,20 +4,16 @@ const {
getUserProfileTemplatedBody,
DefaultProfileTemplate,
accountFromSelfUrl,
selfUrl,
} = require('../../../activitypub_util');
} = require('../../../activitypub/util');
const Config = require('../../../config').get;
const Activity = require('../../../activitypub_activity');
const ActivityPubSettings = require('../../../activitypub_settings');
const Actor = require('../../../activitypub_actor');
const { postJson } = require('../../../http_util');
const UserProps = require('../../../user_property');
const Activity = require('../../../activitypub/activity');
const ActivityPubSettings = require('../../../activitypub/settings');
const Actor = require('../../../activitypub/actor');
// deps
const _ = require('lodash');
const enigma_assert = require('../../../enigma_assert');
const httpSignature = require('http-signature');
const https = require('https');
exports.moduleInfo = {
name: 'ActivityPub',

View File

@ -8,7 +8,7 @@ const {
userFromAccount,
getUserProfileTemplatedBody,
DefaultProfileTemplate,
} = require('../../../activitypub_util');
} = require('../../../activitypub/util');
const _ = require('lodash');
const enigma_assert = require('../../../enigma_assert');

View File

@ -70,5 +70,5 @@ module.exports = {
PublicKeyMain: 'public_key_main_rsa_pem', // RSA public key for user
PrivateKeyMain: 'private_key_main_rsa_pem', // RSA private key (corresponding to PublicKeyMain)
ActivityPubSettings: 'activity_pub_settings', // JSON object (above); see ActivityPubSettings in activitypub_settings.js
ActivityPubSettings: 'activity_pub_settings', // JSON object (above); see ActivityPubSettings in activitypub/settings.js
};