Skip to content
Snippets Groups Projects
Commit 2deedc73 authored by Jake Taylor's avatar Jake Taylor :lips:
Browse files

Merge branch 'hotfix/GCBindings' into 'release'

fix gc bindings

See merge request !384
parents 7bb9e62d adbd4e98
No related branches found
No related tags found
2 merge requests!510Release,!384fix gc bindings
......@@ -156,11 +156,11 @@ func (g *GroupChat) ResendRequest(groupId []byte) ([]byte, error) {
// - serializedGroupData - the result of calling Group.Serialize() on
// any Group object returned over the bindings
func (g *GroupChat) JoinGroup(serializedGroupData []byte) error {
grp, err := gs.DeserializeGroup(serializedGroupData)
grp, err := DeserializeGroup(serializedGroupData)
if err != nil {
return err
}
return g.m.JoinGroup(grp)
return g.m.JoinGroup(grp.g)
}
// LeaveGroup deletes a group so a user no longer has access.
......@@ -322,6 +322,16 @@ func (g *Group) Serialize() []byte {
return g.g.Serialize()
}
// DeserializeGroup converts the results of Group.Serialize() into a Group
// so that its methods can be called.
func DeserializeGroup(serializedGroupData []byte) (*Group, error) {
grp, err := gs.DeserializeGroup(serializedGroupData)
if err != nil {
return nil, err
}
return &Group{g: grp}, nil
}
////////////////////////////////////////////////////////////////////////////////
// Callbacks //
////////////////////////////////////////////////////////////////////////////////
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment