working Gateway for incoming Mod/Bot ws-conn's; simulated Mod client via sim.go

This commit is contained in:
2025-12-01 19:04:35 +01:00
parent 46aef47e21
commit 925dc319e8
5 changed files with 359 additions and 283 deletions

View File

@@ -12,8 +12,8 @@ func (m *GatewayModMessageIn) Validate() error {
if strings.TrimSpace(m.Server) == "" {
return errors.New("server missing")
}
if strings.TrimSpace(m.User.ID) == "" {
return errors.New("user.id missing")
if strings.TrimSpace(m.Author.ID) == "" {
return errors.New("author.id missing")
}
if strings.TrimSpace(m.Content) == "" {
return errors.New("content missing")
@@ -28,7 +28,7 @@ func (m *GatewayBotMessageIn) Validate() error {
if strings.TrimSpace(m.ChannelID) == "" {
return errors.New("channel_id missing")
}
if strings.TrimSpace(m.Author) == "" {
if strings.TrimSpace(m.Author.ID) == "" {
return errors.New("author missing")
}
if strings.TrimSpace(m.Content) == "" {