if e == nil || !e.IsValid() {
continue
}
- data := e.GetData()
if DebugFd != nil {
- spew.Fdump(DebugFd, e.EventType(), data)
+ spew.Fdump(DebugFd, e)
}
+ data := e.GetData()
var user *model.User
if userId, ok := data["user_id"]; ok && userId.(string) != "" {
user = Users[userId.(string)]
case model.WebsocketEventPostEdited,
model.WebsocketEventPostDeleted,
model.WebsocketEventPosted:
- chName := data["channel_name"].(string)
+ chName, ok := data["channel_name"].(string)
+ if !ok {
+ continue
+ }
var post model.Post
if err = json.NewDecoder(
strings.NewReader(data["post"].(string)),