[PR #22750] [CLOSED] fix: guard against null user in Shared Chats view (#22742) #26842

Closed
opened 2026-04-20 06:44:22 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/22750
Author: @aayushbaluni
Created: 3/17/2026
Status: Closed

Base: mainHead: fix/22742-shared-chats-user-null


📝 Commits (1)

  • 76c4b12 fix: guard against null user in Shared Chats view (#22742)

📊 Changes

1 file changed (+11 additions, -7 deletions)

View changed files

📝 src/lib/components/chat/Messages/UserMessage.svelte (+11 -7)

📄 Description

Summary

Fixes #22742.

Root cause: UserMessage.svelte accesses user.id and user.name without null checks. When viewing a shared chat as an unauthenticated viewer, user is null, causing TypeError.

Fix: Wrap ProfileImage in {#if user}, add user && guard to Name condition, add fallback for message.user when user is null.

Changes

  • src/lib/components/chat/Messages/UserMessage.svelte: Added null guards

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/open-webui/open-webui/pull/22750 **Author:** [@aayushbaluni](https://github.com/aayushbaluni) **Created:** 3/17/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/22742-shared-chats-user-null` --- ### 📝 Commits (1) - [`76c4b12`](https://github.com/open-webui/open-webui/commit/76c4b1249353417ebf8f24b76498240b2f5e74db) fix: guard against null user in Shared Chats view (#22742) ### 📊 Changes **1 file changed** (+11 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `src/lib/components/chat/Messages/UserMessage.svelte` (+11 -7) </details> ### 📄 Description ## Summary Fixes #22742. **Root cause:** UserMessage.svelte accesses user.id and user.name without null checks. When viewing a shared chat as an unauthenticated viewer, user is null, causing TypeError. **Fix:** Wrap ProfileImage in {#if user}, add user && guard to Name condition, add fallback for message.user when user is null. ## Changes - src/lib/components/chat/Messages/UserMessage.svelte: Added null guards --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-20 06:44:22 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#26842