From f58b5becfa45818a6825e28c394ee2ee7d92d147 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Tue, 9 Apr 2019 00:51:24 +0200 Subject: Fix invite user crash, set avatar url --- src/Room.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/Room.cpp b/src/Room.cpp index bc87c05..44407c1 100644 --- a/src/Room.cpp +++ b/src/Room.cpp @@ -143,7 +143,7 @@ namespace dchat if(rooms->callbackFuncs.receiveInviteUserCallbackFunc) { InviteUserRequest request; - request.room = std::shared_ptr(this); + request.room = this; request.userPublicKey = std::move(userPublicKey); request.message = std::move(userMsg); rooms->callbackFuncs.receiveInviteUserCallbackFunc(request); @@ -366,9 +366,10 @@ namespace dchat roomRequest.user = user; roomRequest.timestampSeconds = timestampSeconds; roomRequest.loadedFromCache = request.loadedFromCache; - roomRequest.url = std::move(url); + roomRequest.url = url; if(callbackFuncs.userChangeAvatarCallbackFunc) callbackFuncs.userChangeAvatarCallbackFunc(roomRequest); + user->avatarUrl = std::move(url); } break; } -- cgit v1.2.3