mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-03 03:12:31 +00:00
Validate subscriptions service for profile modal
This commit is contained in:
1 parent
4de73ebb76
commit
c9a8b286ea
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