unencrypt incoming feed

This commit is contained in:
Daniel Lugo 2020-01-29 19:09:34 -04:00
parent b0c615d483
commit 7306a52f8e

View file

@ -134,17 +134,15 @@ const onIncoming = cb => {
return
}
Object.entries(uti).forEach(async ([pub, feed]) => {
if (typeof feed !== 'string') {
Object.entries(uti).forEach(async ([pub, encFeed]) => {
if (typeof encFeed !== 'string') {
return
}
const ourSecret = await SEA.secret(await Utils.pubToEpub(pub), user._.sea)
const feed = await SEA.decrypt(encFeed, ourSecret)
if (pubFeedPairsWithIncomingListeners.add(pub + '--' + feed)) {
const ourSecret = await SEA.secret(
await Utils.pubToEpub(pub),
user._.sea
)
require('../../Mediator')
.getGun()
.user(pub)