git ssb

2+

mixmix / ticktack



Tree: 140bd2aa4c9baa0075ccea378b2376a4c90cf8fc

Files: 140bd2aa4c9baa0075ccea378b2376a4c90cf8fc / 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