Skip to content

Commit

Permalink
throw away text message on friend request
Browse files Browse the repository at this point in the history
  • Loading branch information
zoff99 committed May 26, 2023
1 parent 4ad3151 commit 7df4083
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/core/core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,9 @@ void Core::onFriendRequest(Tox* tox, const uint8_t* cFriendPk, const uint8_t* cM
{
std::ignore = tox;
ToxPk friendPk(cFriendPk);
QString requestMessage = ToxString(cMessage, cMessageSize).getQString();
std::ignore = cMessage;
std::ignore = cMessageSize;
QString requestMessage = QString(""); // ToxString(cMessage, cMessageSize).getQString();
emit static_cast<Core*>(core)->friendRequestReceived(friendPk, requestMessage);
}

Expand Down
4 changes: 2 additions & 2 deletions test/core/core_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,10 @@ void TestCore::make_friends()

// Check for expected signal content
QVERIFY(qvariant_cast<ToxPk>(spyBobFriendMsg[0][0]) == alice->getSelfPublicKey());
QVERIFY(spyBobFriendMsg[0][1].toString() == friendMsg);
// QVERIFY(spyBobFriendMsg[0][1].toString() == friendMsg);

QVERIFY(qvariant_cast<ToxPk>(spyAliceFriendMsg[0][0]) == bob->getSelfPublicKey());
QVERIFY(spyAliceFriendMsg[0][1].toString() == friendMsg);
// QVERIFY(spyAliceFriendMsg[0][1].toString() == friendMsg);

// Let Bob accept the friend request from Alice
bob->acceptFriendRequest(alice->getSelfPublicKey());
Expand Down

0 comments on commit 7df4083

Please sign in to comment.