Skip to content

Commit

Permalink
Make group creator field optional
Browse files Browse the repository at this point in the history
  • Loading branch information
tulir committed Nov 1, 2021
1 parent 577401c commit 0ae4001
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion group.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,10 @@ func (cli *Client) parseGroupNode(groupNode *waBinary.Node) (*types.GroupInfo, e
ag := groupNode.AttrGetter()

group.JID = types.NewJID(ag.String("id"), types.GroupServer)
group.OwnerJID = ag.JID("creator")
owner := ag.OptionalJID("creator")
if owner != nil {
group.OwnerJID = *owner
}

group.Name = ag.String("subject")
group.NameSetAt = time.Unix(ag.Int64("s_t"), 0)
Expand Down

0 comments on commit 0ae4001

Please sign in to comment.