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

and gitignore
This commit is contained in:
2023-08-17 19:59:31 +02:00
parent 70a234cdae
commit 7c22bd51cc
2 changed files with 23 additions and 1 deletions

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?