working Gateway for incoming Mod/Bot ws-conn's; simulated Mod client via sim.go
This commit is contained in:
@@ -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) == "" {
|
||||
|
||||
Reference in New Issue
Block a user