Make source-link listings reachable + skip uncontactable applicants
(1) The contact modal only offered a click-through link for Divar sources, so medboom/ iranestekhdam/channel listings with no inline phone looked uncontactable. Offer the source link for ANY source («مشاهده آگهی در منبع»), for talent, shifts, and jobs alike — rescuing the dead applicant cards that actually have a source URL. (2) At publish, skip an applicant («آماده به کار») that has NO contact path at all — no phone, no contact channel, and no source URL. Such a card cannot reach anyone. Existing ones drop out when the talent reprocess button rebuilds the board. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -677,6 +677,13 @@ public class IngestionService
|
||||
// «آماده به کار» — a worker offering themselves. No facility involved.
|
||||
if (parsed.Kind == ListingKind.Talent || kindStr.Contains("talent") || kindStr.Contains("آماده"))
|
||||
{
|
||||
// Skip uncontactable applicants: no phone, no other contact channel, AND no source link to
|
||||
// click through to — such a card is useless to an employer. (A source URL is enough, since
|
||||
// the detail page now offers a «مشاهده آگهی در منبع» link for any source.)
|
||||
var reachable = !string.IsNullOrWhiteSpace(d?.Phone) || !string.IsNullOrWhiteSpace(parsed.Phone)
|
||||
|| parsed.Contacts.Count > 0 || !string.IsNullOrWhiteSpace(raw.SourceUrl);
|
||||
if (!reachable) { raw.Status = RawListingStatus.Discarded; return; }
|
||||
|
||||
// ONE person = ONE listing. Do NOT fan out across roles: an applicant has a single
|
||||
// profession, and «پرستار» + «پرستار کودک» from the same ad were producing duplicate
|
||||
// cards. Use the primary (AI) role; any secondary role names become searchable tags.
|
||||
|
||||
Reference in New Issue
Block a user