changed what a post title is with telegram chat creation
This commit is contained in:
@@ -420,11 +420,16 @@ class TelegramService:
|
||||
strategy_weight=post_type.strategy_weight,
|
||||
)
|
||||
|
||||
# Use first sentence of generated post as title
|
||||
first_sentence = post_content.split("\n")[0].strip()
|
||||
if not first_sentence:
|
||||
first_sentence = post_content[:100].strip()
|
||||
|
||||
# Save the post to DB (status=draft, no critic data)
|
||||
from src.database.models import GeneratedPost
|
||||
saved = await db.save_generated_post(GeneratedPost(
|
||||
user_id=user_uuid,
|
||||
topic_title=topic_text[:200],
|
||||
topic_title=first_sentence[:200],
|
||||
post_content=post_content,
|
||||
iterations=1,
|
||||
writer_versions=[post_content],
|
||||
|
||||
Reference in New Issue
Block a user