Return proper URI when channel name is present. #501

Merged
hackrush01 merged 2 commits from channel-claimID-fix into master 2017-08-26 16:00:01 +02:00
Showing only changes of commit 2c14eb77ac - Show all commits

View file

@ -67,12 +67,13 @@ class FileList extends React.PureComponent {
const content = [];
this._sortFunctions[sortBy](fileInfos).forEach(fileInfo => {
let uriParams = {
claimId: fileInfo.claim_id,
};
let uriParams = {};
if (fileInfo.channel_name) {
uriParams.channelName = fileInfo.channel_name;
uriParams.contentName = fileInfo.name;
// The following can be done as certificateID of a claim is nothing but the claimID of the channel.
uriParams.claimId = fileInfo.value.publisherSignature.certificateId;
} else {
uriParams.claimId = fileInfo.claim_id;
uriParams.name = fileInfo.name;