diff --git a/src/authority/databasehelper.cpp b/src/authority/databasehelper.cpp index 124b3ae5a31e0ac6491982048ce93de0124f4a4a..8c571a3ddf080371a5f7918559cd9ceb0034c352 100644 --- a/src/authority/databasehelper.cpp +++ b/src/authority/databasehelper.cpp @@ -219,7 +219,6 @@ addDataTransferToConversation(Database& db, const api::datatransfer::Info& infoFromDaemon) { auto peerProfileId = getProfileId(db, infoFromDaemon.peerUri); - auto authorId = peerProfileId; return db.insertInto("interactions", { {":account_id", "account_id"}, @@ -231,7 +230,7 @@ addDataTransferToConversation(Database& db, {":status", "status"} }, { {":account_id", accountProfileId}, - {":author_id", authorId}, + {":author_id", infoFromDaemon.isOutgoing? accountProfileId : peerProfileId}, {":conversation_id", conversationId}, {":timestamp", std::to_string(std::time(nullptr))}, {":body", infoFromDaemon.displayName}, diff --git a/src/conversationmodel.cpp b/src/conversationmodel.cpp index c5793e39ccac55533b4d801f4d69f5a74b277b3b..9829a537aaa6ea79063b560e4917cb034fe58474 100644 --- a/src/conversationmodel.cpp +++ b/src/conversationmodel.cpp @@ -1403,7 +1403,7 @@ ConversationModelPimpl::slotTransferStatusCreated(long long dringId, datatransfe auto interactioType = info.isOutgoing ? interaction::Type::OUTGOING_DATA_TRANSFER : interaction::Type::INCOMING_DATA_TRANSFER; - auto interaction = interaction::Info {contactProfileId, + auto interaction = interaction::Info {info.isOutgoing? accountProfileId : contactProfileId, info.displayName, std::time(nullptr), interactioType,