Centralize getNodeId and fix references to owner.id (#8230)

This commit is contained in:
Ben Meadors
2025-10-06 07:56:27 -05:00
committed by GitHub
parent 036a58735e
commit 627c0145e7
8 changed files with 47 additions and 16 deletions

View File

@@ -591,7 +591,7 @@ void test_receiveEncryptedPKITopicToUs(void)
// Should ignore messages published to MQTT by this gateway.
void test_receiveIgnoresOwnPublishedMessages(void)
{
unitTest->publish(&decoded, owner.id);
unitTest->publish(&decoded, nodeDB->getNodeId().c_str());
TEST_ASSERT_TRUE(mockRouter->packets_.empty());
TEST_ASSERT_TRUE(mockRoutingModule->ackNacks_.empty());
@@ -603,7 +603,7 @@ void test_receiveAcksOwnSentMessages(void)
meshtastic_MeshPacket p = decoded;
p.from = myNodeInfo.my_node_num;
unitTest->publish(&p, owner.id);
unitTest->publish(&p, nodeDB->getNodeId().c_str());
TEST_ASSERT_TRUE(mockRouter->packets_.empty());
TEST_ASSERT_EQUAL(1, mockRoutingModule->ackNacks_.size());