mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-06 12:52:26 +00:00
Merge pull request #924 from PR0M3TH3AN/codex/extend-service_contract-with-subscriptions
Validate subscriptions manager injection for profile modal
This commit is contained in:
2 files changed
+15
No files matched your search
@@ -646,6 +646,7 @@ class Application {
|
||||
relayManager,
|
||||
userBlocks,
|
||||
nostrClient,
|
||||
subscriptions,
|
||||
accessControl,
|
||||
getCurrentUserNpub: () => this.getCurrentUserNpub(),
|
||||
nwcSettings: this.nwcSettingsService,
|
||||
|
||||
@@ -275,6 +275,13 @@ const SERVICE_CONTRACT = [
|
||||
type: "object",
|
||||
description: "Reference to the nostr client powering subscriptions and profile fetches.",
|
||||
},
|
||||
{
|
||||
key: "subscriptions",
|
||||
type: "object",
|
||||
optional: true,
|
||||
description:
|
||||
"Subscriptions manager used by the profile modal to inspect or refresh the viewer's channel subscriptions.",
|
||||
},
|
||||
{
|
||||
key: "accessControl",
|
||||
type: "object",
|
||||
@@ -852,6 +859,13 @@ export class ProfileModalController {
|
||||
devLogger.log(...args);
|
||||
};
|
||||
|
||||
const subscriptionsServiceCandidate = this.services.subscriptions;
|
||||
this.subscriptionsService =
|
||||
subscriptionsServiceCandidate &&
|
||||
typeof subscriptionsServiceCandidate === "object"
|
||||
? subscriptionsServiceCandidate
|
||||
: null;
|
||||
|
||||
this.hashtagPreferencesService = this.services.hashtagPreferences;
|
||||
this.describeHashtagPreferencesErrorService =
|
||||
this.services.describeHashtagPreferencesError;
|
||||
|
||||
Reference in new issue
Block a user