git ssb

2+

mixmix / ticktack



Tree: b4bb2278fc6720ae4aa5470a30a66da315b74f00

Files: b4bb2278fc6720ae4aa5470a30a66da315b74f00 / app / obs / pluginWarnings.js

633 bytesRaw
1const nest = require('depnest')
2const { h, onceTrue, Value } = require('mutant')
3
4exports.gives = nest('app.obs.pluginWarnings')
5
6exports.needs = nest({
7 'sbot.obs.connection': 'first'
8})
9
10exports.create = (api) => {
11 var warnings = Value()
12
13 return nest('app.obs.pluginWarnings', function warning () {
14 if (warnings() == undefined) checkForTrouble()
15
16 return warnings
17 })
18
19 function checkForTrouble () {
20 onceTrue(
21 api.sbot.obs.connection,
22 sbot => {
23 if (!sbot.channel) warnings.set(true) // TODO could build a list of missing plugins + effects
24 else warnings.set(false)
25 }
26 )
27 }
28}
29
30

Built with git-ssb-web