Skip to content

Commit

Permalink
feat/ggwave
Browse files Browse the repository at this point in the history
  • Loading branch information
JarbasAl committed Sep 15, 2023
1 parent b687670 commit f9fd446
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
10 changes: 5 additions & 5 deletions hivemind_core/protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -403,9 +403,11 @@ def handle_handshake_message(self, message: HiveMessage,

def handle_bus_message(self, message: HiveMessage,
client: HiveMindClientConnection):
self.handle_inject_mycroft_msg(message.payload, client)
msg = message.payload
print(6666, client.sess.serialize())
self.handle_inject_mycroft_msg(msg, client)
if self.mycroft_bus_callback:
self.mycroft_bus_callback(message.payload)
self.mycroft_bus_callback(msg)

def handle_broadcast_message(self, message: HiveMessage, client: HiveMindClientConnection):
"""
Expand Down Expand Up @@ -498,8 +500,6 @@ def handle_inject_mycroft_msg(self, message: Message, client: HiveMindClientConn
LOG.warning(client.peer + " sent an unauthorized bus message")
return

# ensure client specific session data is injected in query to ovos
message.context["session"] = client.sess.serialize()
if message.msg_type == "speak":
message.context["destination"] = ["audio"]
elif message.context.get("destination") is None:
Expand All @@ -510,7 +510,7 @@ def handle_inject_mycroft_msg(self, message: Message, client: HiveMindClientConn
message.context["peer"] = message.context["source"] = client.peer
message.context["source"] = client.peer

# validate slave session
# ensure client specific session data is injected in query to ovos
message = self.update_slave_session(message, client)

bus = self.get_bus(client)
Expand Down
1 change: 1 addition & 0 deletions hivemind_core/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ def run(self):
self.presence.start()
if self.ggwave is not None:
self.ggwave.start()
LOG.info("listening for ggwave audio handshakes")

self.status.set_ready()

Expand Down

0 comments on commit f9fd446

Please sign in to comment.