only accept friend transfers if it is an actual friend transfer o.o

and gitignore
This commit is contained in:
Green Sky 2023-08-17 19:59:31 +02:00
parent 70a234cdae
commit 7c22bd51cc
No known key found for this signature in database
2 changed files with 23 additions and 1 deletions

22
.gitignore vendored Normal file
View File

@ -0,0 +1,22 @@
.vs/
*.o
*.swp
~*
*~
.idea/
cmake-build-debug/
cmake-build-debugandtest/
cmake-build-release/
*.stackdump
*.coredump
compile_commands.json
/build*
.clangd
.cache
.DS_Store
.AppleDouble
.LSOverride
CMakeLists.txt.user*
CMakeCache.txt

View File

@ -314,7 +314,7 @@ bool ToxTransferManager::onEvent(const Message::Events::MessageConstruct&) {
}
bool ToxTransferManager::onEvent(const Message::Events::MessageUpdated& e) {
if (e.e.all_of<Message::Components::Transfer::ActionAccept>()) {
if (e.e.all_of<Message::Components::Transfer::ActionAccept, Message::Components::Transfer::ToxTransferFriend>()) {
accept(e.e, e.e.get<Message::Components::Transfer::ActionAccept>().save_to_path);
// should?