Fix send message logic and tweak context queries for private messages

This commit is contained in:
2022-08-15 19:16:04 +01:00
parent 4be21cb488
commit a38cfa4ef8
6 changed files with 65 additions and 24 deletions

View File

@@ -196,6 +196,7 @@ def send_irc_message(net, num, channel, msg, nick=None):
payload = {"msg": msg, "channel": channel}
if nick:
payload["nick"] = nick
print("SEND", payload)
messaged = threshold_request(url, payload, method="PUT")
return messaged
@@ -250,3 +251,10 @@ def irc_check_auth(data):
payload = data
updated = threshold_request(url, payload, method="POST")
return updated
def get_irc_sinst(net):
url = f"irc/sinst/{net}"
payload = {}
authentity = threshold_request(url, payload, method="GET")
return authentity