mirror of
https://github.com/orbitdb/orbitdb.git
synced 2025-03-30 15:08:28 +00:00
refactor: Do not filter "messages from me". Hand off to Helia config.
This commit is contained in:
parent
29d1a618e5
commit
280bc60a92
@ -220,10 +220,9 @@ const Sync = async ({ ipfs, log, events, onSynced, start, timeout }) => {
|
||||
const handleUpdateMessage = async message => {
|
||||
const task = async () => {
|
||||
const peerId = await ipfs.libp2p.peerId
|
||||
const messageIsNotFromMe = message => String(peerId) !== String(message.detail.from)
|
||||
const messageHasData = message => message.detail.data !== undefined
|
||||
try {
|
||||
if (messageIsNotFromMe(message) && messageHasData(message) && onSynced) {
|
||||
if (messageHasData(message) && onSynced) {
|
||||
await onSynced(message.detail.data)
|
||||
}
|
||||
} catch (e) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user