تشجيع خيار "Notify Users" للرسائل الخاصة

We want to encourage users to write more private messages about contentious or personal feedback on posts (and do it in a civil and friendly way…), rather than posting it public and possibly steering the conversation off-topic. Here’s the badge:

The query:

SELECT p.user_id, current_timestamp AS granted_at
FROM posts AS p
JOIN topics t on t.id = p.topic_id
WHERE t.archetype = 'private_message'
AND t.title LIKE 'Your post in "%"'
AND p.post_number = 1
AND p.like_count >= 1
AND (:backfill OR p.user_id IN (:user_ids))
GROUP BY p.user_id
HAVING count(*) >=1

I didn’t find a specific trigger for flag messages, so the query uses the default title “Your post in …”. I’d say the badge is easy to game or cheat in several ways, but it would still achieve it’s goal just by giving more visiblity to this feature and communicating that this is regarded positive action for the community.

3 إعجابات

هل يمكن أن يعتمد هذا على post_action لـ “إعلام المستخدم”؟

شيء مثل:

SELECT pa.user_id, current_timestamp AS granted_at
FROM post_actions pa
  JOIN posts p ON p.id = pa.related_post_id
WHERE pa.post_action_type_id = 6
  AND p.like_count >= 1
  AND (:backfill OR p.user_id IN (:user_ids))
GROUP BY pa.user_id
HAVING COUNT(*) >= 1

في الواقع، أعتقد أن الروابط في المنشور الذي استند إليه العلم، وليس الرسالة الخاصة. قد تحتاج إلى تعديل طفيف.

تغيير سريع في الربط لجعله p.id = pa.related_post_id يقوم بالمهمة، أعتقد. :+1:

أعتقد أن HAVING مطلوب فقط إذا كنت تريد منح إصدار فضي وذهبي لأكثر من واحد.

3 إعجابات