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, ActivityStreamsContext,
messageBodyToHtml, messageBodyToHtml,
selfUrl, selfUrl,
} = require('./activitypub_util'); } = require('../activitypub/util');
const { Errors } = require('./enig_error'); const { Errors } = require('../enig_error');
const User = require('./user'); const User = require('../user');
const Actor = require('./activitypub_actor'); const Actor = require('../activitypub/actor');
const { getISOTimestampString } = require('./database'); const { getISOTimestampString } = require('../database');
const UserProps = require('./user_property'); const UserProps = require('../user_property');
const { postJson } = require('./http_util'); const { postJson } = require('../http_util');
// deps // deps
const async = require('async'); const async = require('async');

View File

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

View File

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

View File

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

View File

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

View File

@ -8,7 +8,7 @@ const {
userFromAccount, userFromAccount,
getUserProfileTemplatedBody, getUserProfileTemplatedBody,
DefaultProfileTemplate, DefaultProfileTemplate,
} = require('../../../activitypub_util'); } = require('../../../activitypub/util');
const _ = require('lodash'); const _ = require('lodash');
const enigma_assert = require('../../../enigma_assert'); 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 PublicKeyMain: 'public_key_main_rsa_pem', // RSA public key for user
PrivateKeyMain: 'private_key_main_rsa_pem', // RSA private key (corresponding to PublicKeyMain) 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
}; };