kopia lustrzana https://github.com/mate-dev/meshtastic-matrix-relay
Making new function names uniform
rodzic
5ba984a5ac
commit
1ae5fc9dc7
|
@ -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")
|
||||||
|
|
4
main.py
4
main.py
|
@ -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)
|
||||||
|
|
Ładowanie…
Reference in New Issue