Skip to content
Snippets Groups Projects
Commit 25e515f2 authored by Jonah Husson's avatar Jonah Husson
Browse files

Fix contact list return from multilookup

parent 5eab4872
No related branches found
No related tags found
2 merge requests!510Release,!382Xx 4184/multilookup
......@@ -536,15 +536,18 @@ func MultiLookupUD(e2eID int, udContact []byte, cb UdMultiLookupCallback,
"Failed to marshal failed IDs"))
}
marshalled, err := json.Marshal(contactList)
if err != nil {
cb.Callback(nil, nil,
errors.WithMessage(err,
"Failed to marshal contact list"))
} else {
cb.Callback(marshalled, marshalledFailedIds,
errors.New(errorString))
marshaledContactList := make([][]byte, 0)
for _, con := range contactList {
marshaledContactList = append(
marshaledContactList, con.Marshal())
}
contactListJSON, err2 := json.Marshal(marshaledContactList)
if err2 != nil {
jww.FATAL.Panicf(
"Failed to marshal list of contact.Contact: %+v", err2)
}
cb.Callback(contactListJSON, marshalledFailedIds, errors.New(errorString))
}()
return nil
......
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