hark-store: give stats facts for group notifications
Group notifications were being left out of the initial %unreads fact,
which was causing faulty calculation of notification counts  on the
frontend
Fixes urbit/landscape
%+ turn
~(tap by unreads-count)
|= [=stats-index:store count=@ud]
- ?> ?=(%graph -.stats-index)
:* stats-index
~(wyt in (~(gut by by-index) stats-index ~))
[%count count]
(~(gut by last-seen) stats-index *time)
==
::
+ ++ give-group-unreads
+ ^- (list [stats-index:store stats:store])
+ %+ murn ~(tap by by-index)
+ |= [=stats-index:store nots=(set [time index:store])]
+ ?. ?=(%group -.stats-index)
+ ~
+ :- ~
+ :* stats-index
+ ~(wyt in nots)
+ [%count 0]
+ *time
+ ==
+ ::
++ give-unreads
^- update:store
:- %unreads
- (weld give-each-unreads give-since-unreads)
+ ;: weld
+ give-each-unreads
+ give-since-unreads
+ give-group-unreads
+ ==
--
::
++ on-peek
