2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-06 09:10:25 +08:00

FEATURE: add the pencil glyph when the post was edited after the first flag

This commit is contained in:
Régis Hanol 2014-08-18 18:56:39 +02:00
parent d273374f1a
commit 9f72971d26
5 changed files with 19 additions and 3 deletions

View file

@ -25,7 +25,12 @@ module FlagQuery
p.topic_id,
p.post_number,
p.hidden,
p.deleted_at
p.deleted_at,
(SELECT pr.created_at
FROM post_revisions pr
WHERE pr.post_id = p.id AND pr.user_id = p.user_id
ORDER BY created_at DESC
LIMIT 1) AS last_revised_at
FROM posts p
WHERE p.id in (:post_ids)").map_exec(OpenStruct, post_ids: post_ids)