fix:不认识的用户构建关系
This commit is contained in:
@@ -149,6 +149,7 @@ class Person:
|
||||
if not is_person_known(person_id=self.person_id):
|
||||
self.is_known = False
|
||||
logger.warning(f"用户 {platform}:{user_id}:{person_name}:{person_id} 尚未认识")
|
||||
self.person_name = f"未知用户{self.person_id[:4]}"
|
||||
return
|
||||
|
||||
self.is_known = False
|
||||
|
||||
@@ -389,6 +389,8 @@ class RelationshipBuilder:
|
||||
for person_id, segments in self.person_engaged_cache.items():
|
||||
total_message_count = self._get_total_message_count(person_id)
|
||||
person = Person(person_id=person_id)
|
||||
if not person.is_known:
|
||||
continue
|
||||
person_name = person.person_name or person_id
|
||||
|
||||
if total_message_count >= max_build_threshold or (total_message_count >= 5 and (immediate_build == person_id or immediate_build == "all")):
|
||||
|
||||
Reference in New Issue
Block a user