21 Commits
Author SHA1 Message Date
admin 57ccc3d70c fix(subscription): keep access until last second of the term
- is_subscribed used _days_until() (floor), blocking generation for the whole
  last day when <24h remained though subscription was still active; now checks
  absolute expiry timestamp (expires > now)
- covers all gated actions (post generation, ideas) via _check_subscription
2026-10-30 13:52:03 +02:00
admin a9e8c2e3ba chore(subscription): reword expiry to 'Закончится <дата> в <время> (МСК)' 2026-10-30 13:44:54 +02:00
admin 6f52599342 fix(subscription): extend by absolute expiry timestamp, not floored days
- activate_subscription_days now adds timedelta to the real expires_at
  (max(now, current_expires)) instead of _days_until() floor value;
  prevents losing fractional time on each renewal (10d + 1d -> was 10d)
- return ceil day count for display consistency
- keep _days_until only for is_subscribed gate and support stats
2026-10-30 13:37:17 +02:00
admin 261b2b2d02 fix(subscription): ceil day count so bought N days shows 'N дн.'
- seconds // 86400 floored to N-1 (bought 10 -> showed 9); use ceil instead
- concrete MSK expiry time stays only for the last day (< 24h remaining)
2026-10-30 13:30:27 +02:00
admin 87f22fb249 fix(subscription): show expiry clock time (MSK) when under a day
- subscription_time_left: replace floor-div '23 ч.'/'мин.' branches with the
  concrete expiry timestamp when less than a full day remains
- add MSK_TIMEZONE (UTC+3) as display default; label time as '(МСК)'
- add shared subscription_status_text helper, use it in status menu,
  post-payment reply and dev confirmation instead of floor-rounded days
- tests: cover under-a-day clock format; fix stale to_thread mock
2026-10-30 13:04:38 +02:00
admin 57f4c6cb4f fix(subscription): show precise remaining time 2026-10-29 21:35:58 +02:00
admin 2fd41d82b9 feat(training): drop info heading and show last training time 2026-10-29 20:20:32 +02:00
admin 61c66def3f feat(training): summarize learned profile and add info button 2026-10-29 20:05:42 +02:00
admin 0dc54a26b9 fix: use one-star subscription probe 2026-10-21 14:27:23 +02:00
admin 3819230b3e test: add zero-star invoice probe 2026-10-21 12:56:50 +02:00
admin 112c3247e0 feat: add per-user analytics and stats report 2026-10-20 16:42:30 +02:00
hermes 21db563f28 feat: поддержка в боте — топик, сводка профиля, приветствие оператора
Обращение открывается кнопкой «🆘 Поддержка» или /support в режиме «Помощь».
Отдельного FSM-режима нет: пока обращение активно, внизу остаётся только
«Главное меню», а переключение режимов отклоняется.

- support.py: личка пользователя ↔ персональный топик группы SUPPORT_GROUP_ID.
  Топик создаётся один раз на пользователя и переиспользуется, поэтому
  повторные обращения продолжают ту же переписку. Пересылаются все типы
  контента через copy_message; ответ оператора из топика уходит в личку;
  сообщение с префиксом // остаётся внутренней заметкой. Функция выключена
  без SUPPORT_GROUP_ID.
- Карточка профиля уходит первым сообщением топика: аватарка, имя, username,
  id и сводка — сколько дней пользуется ботом, сколько продлений подписки,
  сколько дней осталось, обучен ли бот (user_store.support_profile_summary).
- Бот не объясняет пользователю, что «передаёт оператору»: в ответ приходит
  случайная фраза из пула SUPPORT_GREETINGS (activity_phrases.support_greeting).
  Формулировки безличные, без «я/бот/оператор»; пул переопределяется через
  SUPPORT_GREETINGS без деплоя.

Проверено: 207 тестов OK (30 новых в tests/test_support.py).
VERSION: 0.1.0+51 -> 0.1.0+52
2026-10-11 16:48:04 +02:00
admin a43ededa1b feat: gate post generation on training flag 2026-10-09 20:11:41 +02:00
admin 3bcec7a9a5 feat: add cumulative account profile training 2026-10-08 23:04:32 +02:00
admin 2d743d2220 feat: improve operation diagnostics and API logging 2026-10-08 19:35:31 +02:00
admin 78d57fe36b feat: подписка 100 звёзд, триал 3 дня, /balance, /subscribe 2026-10-05 19:50:28 +02:00
admin 0d181b0c05 feat: make ideas single-use and clear user data 2026-10-05 00:43:47 +02:00
admin 7744884b78 feat: add idea generation and post history 2026-10-05 00:18:53 +02:00
admin 9f32f930db feat: add help version notices and user errors 2026-10-04 22:26:28 +02:00
admin 33cc2b8a15 feat: show typing status during processing 2026-10-04 21:14:05 +02:00
admin 6d46d2c2e3 feat: build social post writer workflows 2026-10-04 20:53:29 +02:00