git ssb

16+

Dominic / patchbay



Commit aa219ac49a8726ef074556f07460f7bfdd79e683

remove PMs + my posts from /notifications

mix irving committed on 2/10/2018, 10:56:53 PM
Parent: ab0cfd9162ed08e4f61975edf5f604162dcd8b32

Files changed

app/page/notifications.jschanged
app/page/notifications.jsView
@@ -37,20 +37,26 @@
3737 const id = api.keys.sync.id()
3838
3939 const { filterMenu, filterDownThrough, filterUpThrough, resetFeed } = api.app.html.filter(draw)
4040 const { container, content } = api.app.html.scroller({ prepend: [ filterMenu ] })
41 + const removeMyMessages = () => pull.filter(msg => msg.value.author !== id)
42 + const removePrivateMessages = () => pull.filter(msg => msg.value.private !== true)
4143
4244 function draw () {
4345 resetFeed({ container, content })
4446
4547 pull(
4648 next(api.feed.pull.mentions(id), {old: false, limit: 100}),
49 + removeMyMessages(),
50 + removePrivateMessages(),
4751 filterDownThrough(),
4852 Scroller(container, content, api.message.html.render, true, false)
4953 )
5054
5155 pull(
5256 next(api.feed.pull.mentions(id), {reverse: true, limit: 100, live: false}),
57 + removeMyMessages(),
58 + removePrivateMessages(),
5359 filterUpThrough(),
5460 Scroller(container, content, api.message.html.render, false, false)
5561 )
5662 }

Built with git-ssb-web