forked from cwtch.im/cwtch
Fixing json/protobuf confusion
This commit is contained in:
parent
3f6623bf42
commit
b607293c2d
|
@ -112,7 +112,7 @@ func (cp *cwtchPeer) ImportGroup(exportedInvite string) (groupID string, err err
|
||||||
cpp := &protocol.CwtchPeerPacket{}
|
cpp := &protocol.CwtchPeerPacket{}
|
||||||
err = proto.Unmarshal(data, cpp)
|
err = proto.Unmarshal(data, cpp)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
jsobj, err := json.Marshal(cpp.GetGroupChatInvite())
|
jsobj, err := proto.Marshal(cpp.GetGroupChatInvite())
|
||||||
if err == nil {
|
if err == nil {
|
||||||
cp.eventBus.Publish(event.NewEvent(event.NewGroupInvite, map[event.Field]string{
|
cp.eventBus.Publish(event.NewEvent(event.NewGroupInvite, map[event.Field]string{
|
||||||
event.GroupInvite: string(jsobj),
|
event.GroupInvite: string(jsobj),
|
||||||
|
|
Loading…
Reference in New Issue