Browse Source

Update agent_service: add temporary user black list

StrayWarrior 1 tuần trước cách đây
mục cha
commit
1018004ad4
1 tập tin đã thay đổi với 4 bổ sung3 xóa
  1. 4 3
      agent_service.py

+ 4 - 3
agent_service.py

@@ -193,8 +193,9 @@ class AgentService:
             user_tags = self.user_relation_manager.get_user_tags(user_id)
             # FIXME(zhoutian)
             # 测试期间临时逻辑,只发送特定的账号或特定用户
+            user_black_lists = ['7881300148979455',]
             if not (agent.staff_id in set(['1688854492669990'])
-                    or 'AgentTest1' in user_tags):
+                    or 'AgentTest1' in user_tags) or agent.user_id in user_black_lists:
                 logger.warning(f"staff[{agent.staff_id}] user[{user_id}]: skip reply")
                 return None
             self.send_queue.produce(
@@ -307,8 +308,8 @@ if __name__ == "__main__":
         if not text:
             continue
         message_id += 1
-        sender = '7881299670930896'
-        receiver = '1688854492669990'
+        sender = '7881300148979455'
+        receiver = '1688855931724582'
         if text == MessageType.AGGREGATION_TRIGGER.name:
             message = Message.build(MessageType.AGGREGATION_TRIGGER, MessageChannel.CORP_WECHAT,
                 sender, receiver, None, int(time.time() * 1000))