23f273356a
## Issue 7035 Make it clearer that delegated mods can block via Block menu
21 lines
484 B
JavaScript
21 lines
484 B
JavaScript
// @flow
|
|
|
|
export function getChannelIdFromClaim(claim: ?Claim) {
|
|
if (claim) {
|
|
if (claim.value_type === 'channel') {
|
|
return claim.claim_id;
|
|
} else if (claim.signing_channel) {
|
|
return claim.signing_channel.claim_id;
|
|
}
|
|
}
|
|
}
|
|
|
|
export function getChannelFromClaim(claim: ?Claim) {
|
|
return !claim
|
|
? null
|
|
: claim.value_type === 'channel'
|
|
? claim
|
|
: claim.signing_channel && claim.is_channel_signature_valid
|
|
? claim.signing_channel
|
|
: null;
|
|
}
|