Pendigard's picture
Upload folder using huggingface_hub (part 83)
b3787d8 verified
Raw History Blame Contribute Delete
500 Bytes
'use strict'
var _ = require('lodash')
module.exports = function fanout (options) {
var seneca = this
seneca.add('fanout:entry', function(msg, done) {
done()
var entry = this.util.clean(msg)
delete entry.fanout
this.act('follow:list,kind:followers',{user:entry.user},function(err,userlist){
if(err) return
if( userlist && 0 < userlist.length ) {
this.act({
timeline: 'insert',
users: userlist,
}, entry)
}
})
})
}