git ssb

2+

mixmix / ticktack



Tree: fdd450031b20bc486a2acf1b6d9d691da4ce0cb2

Files: fdd450031b20bc486a2acf1b6d9d691da4ce0cb2 / 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