unencrypt incoming feed
This commit is contained in:
parent
b0c615d483
commit
7306a52f8e
1 changed files with 5 additions and 7 deletions
|
|
@ -134,17 +134,15 @@ const onIncoming = cb => {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
Object.entries(uti).forEach(async ([pub, feed]) => {
|
Object.entries(uti).forEach(async ([pub, encFeed]) => {
|
||||||
if (typeof feed !== 'string') {
|
if (typeof encFeed !== 'string') {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
const ourSecret = await SEA.secret(await Utils.pubToEpub(pub), user._.sea)
|
||||||
|
|
||||||
|
const feed = await SEA.decrypt(encFeed, ourSecret)
|
||||||
|
|
||||||
if (pubFeedPairsWithIncomingListeners.add(pub + '--' + feed)) {
|
if (pubFeedPairsWithIncomingListeners.add(pub + '--' + feed)) {
|
||||||
const ourSecret = await SEA.secret(
|
|
||||||
await Utils.pubToEpub(pub),
|
|
||||||
user._.sea
|
|
||||||
)
|
|
||||||
|
|
||||||
require('../../Mediator')
|
require('../../Mediator')
|
||||||
.getGun()
|
.getGun()
|
||||||
.user(pub)
|
.user(pub)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue