zhoulj преди 4 години
родител
ревизия
d8fea96217
променени са 1 файла, в които са добавени 8 реда и са изтрити 0 реда
  1. 8 0
      app/Http/Controllers/Wechat/OfficialAccount/OfficialInteractiveEventController.php

+ 8 - 0
app/Http/Controllers/Wechat/OfficialAccount/OfficialInteractiveEventController.php

@@ -604,6 +604,14 @@ class OfficialInteractiveEventController extends Controller
             \Log::info('sub_statistic_key:' . $sub_statistic_key);
             Redis::sadd($sub_statistic_key, $openid);
             Redis::expire($sub_statistic_key, 30 * 3600);
+            
+            // 有自定义不回复内容的渠道
+            $distribution_self_define_config = DistributionSelfDefineConfig::getDistributionSelfDefineConfig($distribution_channel_id, 'force_subscribe_noreply');
+            if (!empty($distribution_self_define_config)) {
+                \Log::info('distribution_self_define_config: distribution_channel_id:' . $distribution_channel_id);
+                $feedback['text'] = "";
+                return response()->item(new OfficialInteractiveEventTransformer(), (object)$feedback);
+            }
 
             if (!empty($openid)) {
                 # code...