added new signal to wait for channel data, required for the example to work as expected

This commit is contained in:
2023-10-08 12:26:53 +02:00
parent 2ff6b2e597
commit 7b42990b39
2 changed files with 5 additions and 1 deletions

View File

@@ -21,6 +21,8 @@ signal login_attempt(success)
signal chat_message(sender_data, message)
# User sent a whisper message.
signal whisper_message(sender_data, message)
# Initial channel data received
signal channel_data_received(channel_name)
# Unhandled data passed through
signal unhandled_message(message, tags)
# A command has been called with invalid arg count
@@ -627,6 +629,7 @@ func handle_message(message : String, tags : Dictionary) -> void:
var room = msg[2].right(-1)
if (!last_state.has(room)):
last_state[room] = tags
channel_data_received.emit(room)
else:
for key in tags:
last_state[room][key] = tags[key]