mirror of
https://github.com/pdxlocations/contact.git
synced 2026-08-08 09:53:08 +02:00
preFIXes
This commit is contained in:
@@ -49,7 +49,7 @@ def on_receive(packet):
|
||||
message_from_string = ""
|
||||
for node in globals.interface.nodes.values():
|
||||
if message_from_id == node['num']:
|
||||
message_from_string = node["user"]["shortName"] # Get the long name using the node ID
|
||||
message_from_string = node["user"]["shortName"] + ":" # Get the name using the node ID
|
||||
break
|
||||
else:
|
||||
message_from_string = str(decimal_to_hex(message_from_id)) # If long name not found, use the ID as string
|
||||
|
||||
@@ -25,8 +25,8 @@ def send_message(message, destination=BROADCAST_NUM, channel=0):
|
||||
|
||||
# Add sent message to the messages dictionary
|
||||
if globals.channel_list[channel] in globals.all_messages:
|
||||
globals.all_messages[globals.channel_list[channel]].append((">> Sent: ", message))
|
||||
globals.all_messages[globals.channel_list[channel]].append((globals.sent_message_prefix + " ", message))
|
||||
else:
|
||||
globals.all_messages[globals.channel_list[channel]] = [(">> Sent: ", message)]
|
||||
globals.all_messages[globals.channel_list[channel]] = [(globals.sent_message_prefix + " ", message)]
|
||||
|
||||
save_message_to_db(globals.channel_list[channel], myid, message)
|
||||
Reference in New Issue
Block a user