修复了专注错误
Updated logic in heartFC_chat.py and relationship_manager.py to prioritize 'chat_info_platform', then 'user_platform', and finally a default when determining platform information. Added a fallback to 'unknown' in get_person_id if platform is None, improving robustness when platform data is missing. Co-Authored-By: tt-P607 <68868379+tt-P607@users.noreply.github.com>
This commit is contained in:
@@ -87,6 +87,10 @@ class PersonInfoManager:
|
||||
@staticmethod
|
||||
def get_person_id(platform: str, user_id: Union[int, str]) -> str:
|
||||
"""获取唯一id"""
|
||||
# 检查platform是否为None或空
|
||||
if platform is None:
|
||||
platform = "unknown"
|
||||
|
||||
if "-" in platform:
|
||||
platform = platform.split("-")[1]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user