Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
42wim committed Oct 21, 2021
1 parent 346acac commit 2dc2bc7
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions messages.go
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,8 @@ func (m *Client) parseMessage(rmsg *Message) {
case model.WebsocketEventPosted, model.WebsocketEventPostEdited, model.WebsocketEventPostDeleted:
m.parseActionPost(rmsg)
case "user_updated":
user := rmsg.Raw.GetData()["user"].(map[string]interface{})
if _, ok := user["id"].(string); ok {
m.UpdateUser(user["id"].(string))
if user, ok := rmsg.Raw.GetData()["user"].(*model.User); ok {
m.UpdateUser(user.Id)
}
case "group_added":
if err := m.UpdateChannels(); err != nil {
Expand Down

0 comments on commit 2dc2bc7

Please sign in to comment.