misc: You cannot pass referrals when reference module is not set

Co-authored-by: Victor Naumik <vicnaum@gmail.com>
This commit is contained in:
donosonaumczuk
2023-06-22 15:32:45 +01:00
parent aad1d9b7ab
commit e4a5db34e3

View File

@@ -334,6 +334,11 @@ library PublicationLib {
commentParams.referenceModuleData
);
}
} else {
if (commentParams.referrerProfileIds.length > 0 || commentParams.referrerPubIds.length > 0) {
// We don't allow referrers if the reference module is not set.
revert Errors.InvalidReferrer();
}
}
return '';
}
@@ -382,6 +387,11 @@ library PublicationLib {
quoteParams.referenceModuleData
);
}
} else {
if (quoteParams.referrerProfileIds.length > 0 || quoteParams.referrerPubIds.length > 0) {
// We don't allow referrers if the reference module is not set.
revert Errors.InvalidReferrer();
}
}
return '';
}
@@ -430,6 +440,11 @@ library PublicationLib {
mirrorParams.referenceModuleData
);
}
} else {
if (mirrorParams.referrerProfileIds.length > 0 || mirrorParams.referrerPubIds.length > 0) {
// We don't allow referrers if the reference module is not set.
revert Errors.InvalidReferrer();
}
}
return '';
}