Commit cea7d7429bf615fc04c75acdc7b03e767887569d
include own responses on mentions page (so you can see if you replied)
massive hack!Matt McKegg committed on 11/2/2016, 9:55:38 AM
Parent: 62ee1b7bfd9fae4bbec8650f48cc6d5494403927
Files changed
modules/notifications.js | changed |
modules/notifications.js | |||
---|---|---|---|
@@ -46,9 +46,18 @@ | |||
46 | 46 … | }) | |
47 | 47 … | ) | |
48 | 48 … | } | |
49 | 49 … | }, [], { | |
50 | - windowSize: 100 | ||
50 … | + windowSize: 200, | ||
51 … | + filter: (group) => { | ||
52 … | + return ( | ||
53 … | + ((group.message || group.type !== 'message') && (group.author !== id || group.digs.size)) || ( | ||
54 … | + group.repliesFrom && group.repliesFrom.size && ( | ||
55 … | + !group.repliesFrom.has(id) || group.repliesFrom.size > 1 | ||
56 … | + ) | ||
57 … | + ) | ||
58 … | + ) | ||
59 … | + } | ||
51 | 60 … | }) | |
52 | 61 … | } | |
53 | 62 … | } | |
54 | 63 … | ||
@@ -95,9 +104,9 @@ | |||
95 | 104 … | ||
96 | 105 … | return paramap(function (msg, cb) { | |
97 | 106 … | var c = msg.value && msg.value.content | |
98 | 107 … | if (!c || typeof c !== 'object') return cb() | |
99 | - if (msg.value.author in ourIds) return cb() | ||
108 … | + if (msg.value.author in ourIds) return cb(null, msg) | ||
100 | 109 … | ||
101 | 110 … | if (c.mentions && Array.isArray(c.mentions) && c.mentions.some(linksToUs)) { | |
102 | 111 … | return cb(null, msg) | |
103 | 112 … | } |
Built with git-ssb-web