You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// In the future we can split this by oauth scope or section.
this.use(protos.FlairDefinition);
this.use(protos.GraphQLDefinition);
this.use(protos.LinksAndCommentsDefinition);
this.use(protos.ListingsDefinition);
this.use(protos.ModerationDefinition);
this.use(protos.ModNoteDefinition);
this.use(protos.NewModmailDefinition);
this.use(protos.PrivateMessagesDefinition);
this.use(protos.SubredditsDefinition);
this.use(protos.UsersDefinition);
this.use(protos.WidgetsDefinition);
this.use(protos.WikiDefinition);
}
if(pluginIsEnabled(config.realtime)){
this.use(protos.RealtimeDefinition);
}
}
If HTTP is enabled in the first call, then config will have http set to true. If you then try to disable HTTP with Devvit.configure({ http: false }), http will be set to false in config, but the plugin will not be un-this.use()d. It looks like the Reddit API is the only plugin that checks the config value instead of the existence of the plugin.
Personally I don't think it should be possible to disable a plugin after it's been enabled. It could create hard to debug issues where you think you've enabled a plugin in one place but it's been disabled somewhere else.
devvit/packages/public-api/src/devvit/Devvit.ts
Lines 134 to 176 in 67ca50a
If HTTP is enabled in the first call, then
config
will havehttp
set totrue
. If you then try to disable HTTP withDevvit.configure({ http: false })
,http
will be set tofalse
inconfig
, but the plugin will not be un-this.use()
d. It looks like the Reddit API is the only plugin that checks theconfig
value instead of the existence of the plugin.devvit/packages/public-api/src/devvit/Devvit.ts
Line 488 in 67ca50a
devvit/packages/public-api/src/devvit/Devvit.ts
Lines 593 to 595 in 67ca50a
The text was updated successfully, but these errors were encountered: