Fix an incorrect variable

This commit is contained in:
KnugiHK
2023-12-03 20:17:28 +08:00
parent f81f31d667
commit d5cef051d3

View File

@@ -94,7 +94,7 @@ def messages(db, data, media_folder):
is_group_message = content["ZGROUPINFO"] is not None
if ZCONTACTJID not in data:
data[ZCONTACTJID] = ChatStore(Device.IOS)
path = f'{media_folder}/Media/Profile/{_id.split("@")[0]}'
path = f'{media_folder}/Media/Profile/{ZCONTACTJID.split("@")[0]}'
avatars = glob(f"{path}*")
if 0 < len(avatars) <= 1:
data[ZCONTACTJID].their_avatar = avatars[0]