fix notes filter in profile browsing.
This commit is contained in:
parent
f3872fb6f7
commit
af56ddc7bd
|
@ -79,7 +79,7 @@
|
|||
var rel = []
|
||||
if (this.isFullPage) {
|
||||
for (let k of this.$store.state.browsing.keys()) {
|
||||
if (k.slice(0, 9) == 'rel:' + this.id.slice(0, 5)) {
|
||||
if (k.slice(0, 10) == 'rel:' + this.id.slice(0, 5) + ':') {
|
||||
rel.push(this.$store.state.browsing.get(k))
|
||||
}
|
||||
}
|
||||
|
|
|
@ -87,7 +87,10 @@
|
|||
notes() {
|
||||
var notes = []
|
||||
for (let k of this.$store.state.browsing.keys()) {
|
||||
if (k === 'from:' + this.$route.params.key) {
|
||||
if (
|
||||
k.slice(0, 11) ===
|
||||
'from:' + this.$route.params.key.slice(0, 5) + ':'
|
||||
) {
|
||||
let note = this.$store.state.browsing.get(k)
|
||||
notes.push(note)
|
||||
}
|
||||
|
|
|
@ -88,7 +88,10 @@ export default {
|
|||
receivedTextNote(state, {event: evt, context}) {
|
||||
// all notes go to browsing
|
||||
state.browsing.set(evt.id.slice(0, 5), evt)
|
||||
state.browsing.set('from:' + evt.pubkey.slice(0, 5), evt)
|
||||
state.browsing.set(
|
||||
'from:' + evt.pubkey.slice(0, 5) + ':' + evt.id.slice(0, 5),
|
||||
evt
|
||||
)
|
||||
if (evt.ref && evt.ref.length) {
|
||||
state.browsing.set(
|
||||
'rel:' + evt.ref.slice(0, 5) + ':' + evt.id.slice(0, 5),
|
||||
|
|
Loading…
Reference in New Issue