Differences From
Artifact [47dae6d49a]:
127 127 ) as post,
128 128 cn.promotime::bigint as tltime,
129 129 coalesce(cn.promoter, (cn.orig).author) as promoter
130 130 from content as cn
131 131 order by cn.promotime desc
132 132 );
133 133
134 ---
135 134 --create temp view parsavpg_post_threads as (
136 135 --
137 136 --);
138 ---
137 +
139 138 create temp view parsavpg_notices as (
140 139 -- TODO add mentions
141 140 with ntimes as (
142 141 select uid, value as when from parsav_actor_conf_ints where key = 'notice-clear-time'
143 142 ), acts as (
144 143 select row(
145 144 kmap.kind::smallint,
................................................................................
149 148 null::bigint,
150 149 null::text
151 150 )::pg_temp.parsavpg_intern_notice as notice,
152 151 p.author as rcpt
153 152 from parsav_acts as a
154 153 inner join parsav_posts as p on a.subject = p.id
155 154 inner join (values
156 - ('rt', 4 ),
157 - ('like', 3 ),
158 - ('react', 5 )
155 + ('rt', <notice:rt> ),
156 + ('like', <notice:like> ),
157 + ('react', <notice:react>)
159 158 ) as kmap(kstr,kind) on kmap.kstr = a.kind
160 159 left join ntimes as nt on nt.uid = p.author
161 160 where a.time >= coalesce(nt.when,0)
162 161 ), replies as (
163 162 select row(
164 - 2::smallint,
163 + <notice:reply>::smallint,
165 164 coalesce(p.posted,p.discovered),
166 165 p.author,
167 166 p.parent,
168 167 p.id,
169 168 null::text
170 169 )::pg_temp.parsavpg_intern_notice as notice,
171 170 par.author as rcpt