fix wrongly sending hmac only to the init sender
This commit is contained in:
		| @@ -636,9 +636,14 @@ bool ToxP2PRNG::handle_init_with_hmac(Contact3Handle c, const ByteSpan id, ByteS | |||||||
| 		} | 		} | ||||||
| 	); | 	); | ||||||
|  |  | ||||||
|  | 	for (const auto peer : new_rng_state.contacts) { | ||||||
|  | 		if (peer.all_of<Contact::Components::TagSelfStrong>()) { | ||||||
|  | 			continue; // skip self | ||||||
|  | 		} | ||||||
| 		// TODO: queue | 		// TODO: queue | ||||||
| 	// TODO: record result | 		// TODO: record send success | ||||||
| 	send_hmac(c, id, ByteSpan{hmac}); | 		send_hmac(peer, id, ByteSpan{hmac}); | ||||||
|  | 	} | ||||||
|  |  | ||||||
| 	// fire hmac event | 	// fire hmac event | ||||||
| 	dispatch( | 	dispatch( | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user