fix: follow thyself with the correct key.

sse-post-key-prefixes
fiatjaf 2020-11-14 23:15:23 -03:00
rodzic 1b3ea6fb50
commit 42ee90f7d9
1 zmienionych plików z 5 dodań i 9 usunięć

Wyświetl plik

@ -52,7 +52,10 @@ export default createStore({
setInit(state, {relays, key, following, home, metadata}) {
state.relays = relays
state.key = key
state.following = following
state.following = following.concat(
// always be following thyself
ec.keyFromPrivate(state.key, 'hex').getPublic(true, 'hex')
)
state.home = home
state.metadata = metadata
},
@ -231,14 +234,7 @@ async function init(store) {
}
return rls
}),
db.following.toArray().then(r =>
r
.map(({pubkey}) => pubkey)
.concat(
// always be following thyself
store.getters.pubKeyHex
)
),
db.following.toArray().then(r => r.map(({pubkey}) => pubkey)),
db.mynotes
.orderBy('created_at')
.reverse()