Making new function names uniform

pull/1/head
Jeremiah K 2023-06-08 22:37:55 -05:00
rodzic 5ba984a5ac
commit 1ae5fc9dc7
2 zmienionych plików z 3 dodań i 3 usunięć

Wyświetl plik

@ -110,7 +110,7 @@ def save_shortname(meshtastic_id, shortname):
) )
conn.commit() conn.commit()
def update_shortname(nodes): def update_shortnames(nodes):
if nodes: if nodes:
for node in nodes.values(): for node in nodes.values():
user = node.get("user") user = node.get("user")

Wyświetl plik

@ -9,7 +9,7 @@ from nio import (
) )
from pubsub import pub from pubsub import pub
from typing import List from typing import List
from db_utils import initialize_database, update_longnames, update_shortname from db_utils import initialize_database, update_longnames, update_shortnames
from matrix_utils import ( from matrix_utils import (
connect_matrix, connect_matrix,
join_matrix_room, join_matrix_room,
@ -73,7 +73,7 @@ async def main():
try: try:
# Update longnames & shortnames # Update longnames & shortnames
update_longnames(meshtastic_interface.nodes) update_longnames(meshtastic_interface.nodes)
update_shortname(meshtastic_interface.nodes) update_shortnames(meshtastic_interface.nodes)
matrix_logger.info("Syncing with server...") matrix_logger.info("Syncing with server...")
await matrix_client.sync_forever(timeout=30000) await matrix_client.sync_forever(timeout=30000)