Show contact form on ListingPage for anonymous users too

This commit is contained in:
Vesa Luusua 2018-01-05 15:42:52 +02:00
parent 7e17588c57
commit 4dc82ce1b2

View file

@ -317,7 +317,7 @@ export class ListingPageComponent extends Component {
const userAndListingAuthorAvailable = !!(currentUser && authorAvailable);
const isOwnListing =
userAndListingAuthorAvailable && currentListing.author.id.uuid === currentUser.id.uuid;
const showContactUser = currentUser && !isOwnListing;
const showContactUser = !currentUser || (currentUser && !isOwnListing);
const currentAuthor = authorAvailable ? currentListing.author : null;
const ensuredAuthor = ensureUser(currentAuthor);