diff options
Diffstat (limited to 'protocols/Tox/src/tox_account.cpp')
-rw-r--r-- | protocols/Tox/src/tox_account.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/protocols/Tox/src/tox_account.cpp b/protocols/Tox/src/tox_account.cpp index 8af024e9f8..b7c7276c12 100644 --- a/protocols/Tox/src/tox_account.cpp +++ b/protocols/Tox/src/tox_account.cpp @@ -55,7 +55,7 @@ void CToxProto::InitToxCore() tox_callback_file_control(tox, OnFileRequest, this);
tox_callback_file_send_request(tox, OnFriendFile, this);
tox_callback_file_data(tox, OnFileData, this);
- // avatars + // avatars
tox_callback_avatar_info(tox, OnGotFriendAvatarInfo, this);
tox_callback_avatar_data(tox, OnGotFriendAvatarData, this);
@@ -71,6 +71,12 @@ void CToxProto::InitToxCore() tox_get_address(tox, &pubKey[0]);
std::string address = DataToHexString(pubKey);
setString(NULL, TOX_SETTINGS_ID, address.c_str());
+
+ std::tstring avatarPath = GetContactAvatarFilePath(NULL);
+ if (IsFileExists(avatarPath))
+ {
+ SetToxAvatar(avatarPath);
+ }
}
void CToxProto::UninitToxCore()
|