feat: ユーザーアイコン(user_icon)をプロトコル・モデルに追加#178
Merged
Merged
Conversation
| @action() | ||
| async def join(self, room_id: uuid, user_name: str, **kwargs): | ||
| async def join( | ||
| self, room_id: uuid, user_name: str, user_icon="FaRegUser", **kwargs |
Contributor
There was a problem hiding this comment.
🚫 [mypy] reported by reviewdog 🐶
Module "uuid" is not valid as a type [valid-type]
| @action() | ||
| async def join(self, room_id: uuid, user_name: str, **kwargs): | ||
| async def join( | ||
| self, room_id: uuid, user_name: str, user_icon="FaRegUser", **kwargs |
Contributor
There was a problem hiding this comment.
📝 [mypy] reported by reviewdog 🐶
Perhaps you meant to use a protocol matching the module structure?
ルーム参加者が react-icons (Font Awesome 6) のキー文字列を表示アイコンとして 持てるようにする。create/join で受け取り、user / user_list で配信する。 後方互換のため、旧拡張が user_icon を送らない場合は既定キー "FaRegUser" (現行のシンプルなユーザーアイコン相当)にフォールバックする。 - models.AnimeUser.user_icon (平文 CharField, default="FaRegUser") + migration 0003 - format.User.user_icon (default="FaRegUser") - consumers: create/join/database_create_user で user_icon を受け渡し、 database_user_list の values に user_icon を追加 - factories/tests: 往復と既定フォールバックを検証 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
e33aa40 to
86b3a74
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
ルーム参加者が表示アイコン (
user_icon) を持てるようにする。フロント(拡張)が react-icons (Font Awesome 6) のキー文字列を送り、user_nameと同様にcreate/joinで受け取ってuser/user_listで配信する。後方互換
user_iconを送らない場合は既定キー"FaRegUser"(現行のシンプルなユーザーアイコン相当)にフォールバック。format.pyのUser.user_iconもデフォルト付きで、欠落データに耐える。変更
models.AnimeUser.user_icon(平文CharField,default="FaRegUser")format.User.user_icon(default="FaRegUser")consumers:create/join/database_create_userで受け渡し、database_user_listのvaluesにuser_iconを追加factories/tests: 往復と既定フォールバックを検証動作確認
pytest streamer/tests.py全 6 件 passmakemigrations --checkクリーン /ruff format・ruff checkクリーン🤖 Generated with Claude Code