Skip to content
Snippets Groups Projects

Jsalyers muting at sql level

Merged Jason Salyers requested to merge jsalyers-muting-at-sql-level into develop
All threads resolved!
Compare and Show latest version
2 files
+ 8
16
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -109,8 +109,7 @@ BEGIN
hp.community_title,
hp.role_id,
hp.is_pinned,
hp.curator_payout_value,
hp.is_muted
hp.curator_payout_value
FROM
hive_posts_view hp
JOIN hive_subscriptions hs ON hp.community_id = hs.community_id
@@ -174,8 +173,7 @@ BEGIN
hp.community_title,
hp.role_id,
hp.is_pinned,
hp.curator_payout_value,
hp.is_muted
hp.curator_payout_value
FROM
(
SELECT
@@ -250,8 +248,7 @@ BEGIN
hp.community_title,
hp.role_id,
hp.is_pinned,
hp.curator_payout_value,
hp.is_muted
hp.curator_payout_value
FROM
hive_posts_view hp
JOIN hive_subscriptions hs ON hp.community_id = hs.community_id
@@ -315,8 +312,7 @@ BEGIN
hp.community_title,
hp.role_id,
hp.is_pinned,
hp.curator_payout_value,
hp.is_muted
hp.curator_payout_value
FROM
hive_posts_view hp
JOIN hive_subscriptions hs ON hp.community_id = hs.community_id
@@ -380,8 +376,7 @@ BEGIN
hp.community_title,
hp.role_id,
hp.is_pinned,
hp.curator_payout_value,
hp.is_muted
hp.curator_payout_value
FROM
(
SELECT
@@ -394,12 +389,11 @@ BEGIN
WHERE
ha.name = _observer AND hp1.counter_deleted = 0 AND NOT hp1.is_paidout AND hp1.depth = 0
AND ( __post_id = 0 OR hp1.sc_trend < __trending_limit OR ( hp1.sc_trend = __trending_limit AND hp1.id < __post_id ) )
AND hp.author NOT IN (SELECT muted FROM muted_accounts_view WHERE observer = _observer)
ORDER BY hp1.sc_trend DESC, hp1.id DESC
LIMIT _limit
) trending
JOIN hive_posts_view hp ON trending.id = hp.id
WHERE hp.author NOT IN (SELECT muted FROM muted_accounts_view WHERE observer = _observer)
ORDER BY trending.sc_trend DESC, trending.id DESC
LIMIT _limit;
END
@@ -457,8 +451,7 @@ BEGIN
hp.community_title,
hp.role_id,
hp.is_pinned,
hp.curator_payout_value,
hp.is_muted
hp.curator_payout_value
FROM
hive_posts_view hp
JOIN hive_subscriptions hs ON hp.community_id = hs.community_id
Loading