save your own notes locally when they're received from relays.
this is useful to keep a local backup of notes you may have published from other clients in your main client (or even doing a light syncing- backup strategy for your own notes by using the same key in multiple clients).
This commit is contained in:
parent
1ae23c9c20
commit
f2f2b6a066
|
@ -63,6 +63,10 @@ export default {
|
|||
}
|
||||
break
|
||||
case KIND_TEXTNOTE:
|
||||
if (event.pubkey === store.getters.pubKeyHex) {
|
||||
db.mynotes.put(event)
|
||||
}
|
||||
|
||||
store.commit('receivedTextNote', {event, context})
|
||||
break
|
||||
case KIND_RECOMMENDSERVER:
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
import {pubkeyFromPrivate} from './helpers'
|
||||
import {db} from './globals'
|
||||
import {CONTEXT_REQUESTED, CONTEXT_NOW, CONTEXT_PAST} from './constants'
|
||||
import {CONTEXT_REQUESTED} from './constants'
|
||||
|
||||
export default {
|
||||
setInit(state, {relays, following, home, metadata, petnames}) {
|
||||
|
|
Loading…
Reference in New Issue