align protocol constants and update handling of HELLO/WELCOME messages

This commit is contained in:
kc1awv
2025-12-31 16:01:58 -05:00
parent 8afacd8727
commit c0e72c7f11
5 changed files with 93 additions and 52 deletions

View File

@@ -1,7 +1,7 @@
import pytest
from rrcd.constants import (
B_HELLO_NICK,
B_HELLO_NICK_LEGACY,
K_BODY,
K_ID,
K_NICK,
@@ -16,7 +16,7 @@ from rrcd.envelope import make_envelope, validate_envelope
def test_validate_accepts_make_envelope() -> None:
env = make_envelope(T_HELLO, src=b"peer", body={B_HELLO_NICK: "alice"})
env = make_envelope(T_HELLO, src=b"peer", body={B_HELLO_NICK_LEGACY: "alice"})
validate_envelope(env)