feat: 포스트를 만들 때 날씨각 캐릭터(해님·구름·달님) 댓글 1~2개 — '날씨각' 표시, 신고·차단 메뉴 없음, 이미 만든 날은 scripts/fill_bot_comments.py

This commit is contained in:
minaChoi committed 2026-10-27 13:14:30 +09:00
1 parent d32e24a5ab
commit 98b5c0cbe3
19 files changed
+864 -4

No files matched your search

+4
View File
@@ -13,6 +13,7 @@ from common.utils.kma_time import kst_midnight, now_kst
from crud.feed_crud import FeedCRUD
from crud.reaction_crud import ReactionCRUD
from crud.region_crud import RegionCRUD
from services.bot_comment import BOT_COLORS, BOT_NAMES
from services.talk_service import _LINK, _PHONE
COMMENT_MAX = 60
@@ -31,6 +32,7 @@ class CommentView:
mood: Optional[str]
liked: bool
mine: bool
official: bool = False
@dataclass
@@ -87,6 +89,8 @@ class ReactionService:
@staticmethod
def _view(c: Comment, nickname: Optional[str], character: Optional[str], color: Optional[str], mood: Optional[str], liked: bool, who: Liker) -> CommentView:
if c.bot is not None:
return CommentView(comment=c, nickname=BOT_NAMES.get(c.bot, "날씨각"), character=c.bot, color=BOT_COLORS.get(c.bot, ANON_COLOR), mood=None, liked=liked, mine=False, official=True)
if c.user_id is None:
mine = who.user_id is None and c.ip_hash == who.ip_hash
return CommentView(comment=c, nickname=f"{c.region_name} 익명" if c.region_name else "익명", character=ANON_CHARACTER, color=ANON_COLOR, mood=None, liked=liked, mine=mine)