Social auto-posting (phase 1): daily applicant digest to Telegram/Bale + Instagram caption
CI/CD / CI · dotnet build (push) Successful in 1m51s
CI/CD / Deploy · hamkadr (push) Successful in 2m51s

Adds a «شبکه‌های اجتماعی» admin section + scheduler that publishes a daily
«کادر آماده‌به‌کار امروز» digest:

- AppSetting: social toggles, posts-per-day, editable header/footer,
  per-channel bot token + chat id (Telegram, Bale), Instagram enable +
  extra hashtags, proxy toggle, last-posted timestamp (+ migration).
- SocialPostService: builds today's talent digest as text, posts to
  Telegram and Bale via their bot sendMessage APIs (proxy-aware), and
  produces an Instagram caption + auto hashtags (role/city based).
- SocialPostWorker: posts N times/day, evenly spaced, self-paced; reads
  settings live so it's togglable without redeploy.
- /Admin/Social: credentials + header/footer + posts/day, live preview of
  today's message, «ارسال اکنون» button, and an Instagram caption pack
  with copy button (semi-automatic — you post the image manually).
- Nav link added.

Telegram/Bale post as TEXT (per request). The Vazirmatn image card for
Instagram is phase 2 (needs SkiaSharp+HarfBuzz + a TTF font).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
soroush.asadi
2026-06-08 09:20:49 +03:30
parent 2bb8771ade
commit fb02c81830
10 changed files with 2186 additions and 0 deletions
@@ -99,6 +99,10 @@ namespace JobsMedical.Web.Migrations
.HasMaxLength(200)
.HasColumnType("character varying(200)");
b.Property<string>("InstagramHashtags")
.HasMaxLength(1000)
.HasColumnType("character varying(1000)");
b.Property<bool>("MedjobsEnabled")
.HasColumnType("boolean");
@@ -133,6 +137,51 @@ namespace JobsMedical.Web.Migrations
.HasMaxLength(100)
.HasColumnType("character varying(100)");
b.Property<string>("SocialBaleBotToken")
.HasMaxLength(200)
.HasColumnType("character varying(200)");
b.Property<string>("SocialBaleChatId")
.HasMaxLength(120)
.HasColumnType("character varying(120)");
b.Property<bool>("SocialBaleEnabled")
.HasColumnType("boolean");
b.Property<bool>("SocialEnabled")
.HasColumnType("boolean");
b.Property<string>("SocialFooter")
.HasMaxLength(1000)
.HasColumnType("character varying(1000)");
b.Property<string>("SocialHeader")
.HasMaxLength(1000)
.HasColumnType("character varying(1000)");
b.Property<bool>("SocialInstagramEnabled")
.HasColumnType("boolean");
b.Property<DateTime?>("SocialLastPostedAt")
.HasColumnType("timestamp with time zone");
b.Property<int>("SocialPostsPerDay")
.HasColumnType("integer");
b.Property<string>("SocialTelegramBotToken")
.HasMaxLength(200)
.HasColumnType("character varying(200)");
b.Property<string>("SocialTelegramChatId")
.HasMaxLength(120)
.HasColumnType("character varying(120)");
b.Property<bool>("SocialTelegramEnabled")
.HasColumnType("boolean");
b.Property<bool>("SocialUseProxy")
.HasColumnType("boolean");
b.Property<string>("TelegramChannels")
.HasMaxLength(2000)
.HasColumnType("character varying(2000)");