1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-17 17:42:20 +03:00

eddn: EDDN.send_message(): Only set standard header if not already set.

Else we risk overwriting e.g. `CAPI-shipyard`.
This commit is contained in:
Athanasius 2022-11-23 13:46:49 +00:00
parent fda91df04f
commit 524c0425fb
No known key found for this signature in database
GPG Key ID: 772697E181BB2767

View File

@ -30,7 +30,6 @@ import pathlib
import re
import sqlite3
import sys
import time
import tkinter as tk
from collections import OrderedDict
from platform import system
@ -929,14 +928,18 @@ class EDDN:
# 'Station data'
if config.get_int('output') & config.OUT_EDDN_SEND_STATION_DATA:
# And user has 'station data' configured to be sent
if 'header' not in msg:
msg['header'] = self.standard_header()
msg_id = self.sender.add_message(cmdr, msg)
# 'Station data' is never delayed on construction of message
self.sender.send_message_by_id(msg_id)
elif config.get_int('output') & config.OUT_EDDN_SEND_NON_STATION:
# Any data that isn't 'station' is configured to be sent
if 'header' not in msg:
msg['header'] = self.standard_header()
msg_id = self.sender.add_message(cmdr, msg)
if not (config.get_int('output') & config.OUT_EDDN_DELAY):
# No delay in sending configured, so attempt immediately