Fixing json/protobuf confusion

This commit is contained in:
Sarah Jamie Lewis 2019-02-12 18:46:23 -08:00
父節點 3f6623bf42
當前提交 b607293c2d
共有 1 個檔案被更改,包括 1 行新增1 行删除

查看文件

@ -112,7 +112,7 @@ func (cp *cwtchPeer) ImportGroup(exportedInvite string) (groupID string, err err
cpp := &protocol.CwtchPeerPacket{}
err = proto.Unmarshal(data, cpp)
if err == nil {
jsobj, err := json.Marshal(cpp.GetGroupChatInvite())
jsobj, err := proto.Marshal(cpp.GetGroupChatInvite())
if err == nil {
cp.eventBus.Publish(event.NewEvent(event.NewGroupInvite, map[event.Field]string{
event.GroupInvite: string(jsobj),