New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
defined callback_user in lines 104 and 382 #6662
base: main
Are you sure you want to change the base?
Conversation
Thanks for creating this! Could you please run Also, can you add a few tests like a142060#diff-5408514bec6f5895a04fa7826621bcce676dd161c74eff71bce900e6c677a584L595-L600 |
I ran the "pre-commit install" as suggested and added a line (384): user = self.callback_user
let me know if this is correct or if some modifications are to be made |
No, the assert should be under |
I cannot find both files at the mentioned directories. Please confirm from your end. in the main directory (https://github.com/holoviz/panel/tree/main), I get to panel/tests/widgets and there is no test_chat.py file and no chat.py file at panel/widgets. what is going wrong? |
Woops, we moved them to panel/tests/chat/ |
okay, can you verify if this is correct? I've added an assertion in the test_feed.py file under the function test_default_avatars_superseded_by_callback_avatar. |
I'd explicitly set callback_avatar to something else prior to ensure it's actually working as intended. |
I added the line :
callback_avatar = param.ClassSelector(class_=(str, BinaryIO), doc="""
The default avatar to use for the entry provided by the callback.
Takes precedence over
ChatEntry.default_avatars
if set; else, if None,defaults to the avatar set in
ChatEntry.default_avatars
if matching key exists.Otherwise defaults to the first character of the
callback_user
.""")and changed line :
avatar = None
to :
avatar = self.callback_avatar