summaryrefslogtreecommitdiffstats
path: root/packages/meshbay-hub/src/meshbay_hub/static/transport.js
diff options
context:
space:
mode:
Diffstat (limited to 'packages/meshbay-hub/src/meshbay_hub/static/transport.js')
-rw-r--r--packages/meshbay-hub/src/meshbay_hub/static/transport.js34
1 files changed, 1 insertions, 33 deletions
diff --git a/packages/meshbay-hub/src/meshbay_hub/static/transport.js b/packages/meshbay-hub/src/meshbay_hub/static/transport.js
index 120c7d7..d6a28d9 100644
--- a/packages/meshbay-hub/src/meshbay_hub/static/transport.js
+++ b/packages/meshbay-hub/src/meshbay_hub/static/transport.js
@@ -75,7 +75,7 @@ function _aborted() {
const ADMIN_OP_TYPES = new Set([
'tmdb_override', 'tmdb_config', 'tmdb_enabled', 'video_root', 'audio_root',
'photo_roots',
- 'musicbrainz_config', 'musicbrainz_enabled', 'file_delete', 'dir_delete',
+ 'musicbrainz_enabled', 'file_delete', 'dir_delete',
'member_upload', 'apps_enabled', 'set_scan_settings', 'member_revoke',
'root_add', 'root_remove', 'member_unpin', 'gek_rotate', 'group_attach',
'group_detach', 'invite_create',
@@ -276,7 +276,6 @@ class MeshBayTransport {
set onVideoRoot(fn) { this._onVideoRoot = fn; }
set onAudioRoot(fn) { this._onAudioRoot = fn; }
set onPhotoRoots(fn) { this._onPhotoRoots = fn; }
- set onMusicbrainzConfig(fn) { this._onMusicbrainzConfig = fn; }
set onMusicbrainzEnabled(fn) { this._onMusicbrainzEnabled = fn; }
set onIndexProgress(fn) { this._onIndexProgress = fn; }
// Fired once an automatic reconnect (see _reconnectLoop) lands a fresh
@@ -1055,31 +1054,6 @@ class MeshBayTransport {
}
/**
- * Set/clear the node-wide MusicBrainz contact string — the User-Agent
- * identity MusicBrainz's usage policy asks for, not a credential (there
- * is none, docs/musicbay.md §3.1). Signed like setTmdbConfig: this turns
- * on outbound third-party network traffic the operator has to agree to.
- * `contact: ''` explicitly clears it (reverting to "no calls at all");
- * omit it (undefined/null) to leave whatever is stored unchanged.
- */
- async setMusicbrainzConfig(contact, signFn) {
- const msg = await this._sendAndWait({
- type: 'musicbrainz_config', v: '0.8',
- contact: contact === undefined ? null : contact,
- });
- if (msg.type === 'error') throw new Error(msg.detail);
- if (msg.type === 'admin_challenge') {
- // Must match the node's subject byte-for-byte (webrtc_server.py
- // _do_musicbrainz_config) — not a secret like tmdb_config's token,
- // but still kept out of the audit log as free text: only whether one
- // was supplied travels in the subject.
- const subject = `contact_configured=${contact ? 'yes' : 'no'}`;
- return this._authorizeAdminOp(msg, 'musicbrainz_config', subject, signFn);
- }
- return msg;
- }
-
- /**
* Whether MusicBrainz lookups run for this group at all — per-group from
* the start (docs/musicbay.md §3.2/§6). Signed like setTmdbEnabled.
*/
@@ -2077,12 +2051,6 @@ class MeshBayTransport {
this._onPhotoRoots(msg.roots || []);
}
- // Node-wide, like tmdb_config_ack above — no token equivalent to hide,
- // only whether a contact string is configured (docs/musicbay.md §3.2).
- if (msg.type === 'musicbrainz_config_ack' && this._onMusicbrainzConfig) {
- this._onMusicbrainzConfig({ contactConfigured: Boolean(msg.contact_configured) });
- }
-
// Per-group, like tmdb_enabled_ack above.
if (msg.type === 'musicbrainz_enabled_ack' && this._onMusicbrainzEnabled) {
this._onMusicbrainzEnabled(Boolean(msg.enabled));