feat(message): support group avatar in navigation and chat screen
Pass group avatar through notification extras, navigation hrefs, and route parameters. Update ChatScreen to resolve group information (ID, name, and avatar) by prioritizing route parameters (e.g., from push notifications) and falling back to conversation data from the MessageManager. - Update `NotificationBootstrap` to include `groupAvatar` in query params - Update `hrefChat` to support `groupAvatar` - Refactor `useChatScreen` to use `effectiveGroupId`, `effectiveGroupName`, and `effectiveGroupAvatar` - Ensure `MessageManager` fetches conversation details if missing when activating a conversation - Update `MessageListScreen` to pass `groupAvatar` during navigation
This commit is contained in:
@@ -161,6 +161,7 @@ function NotificationBootstrap() {
|
||||
const conversationType = extras.conversation_type || extras.conversationType;
|
||||
const groupId = extras.group_id || extras.groupId;
|
||||
const groupName = extras.group_name || extras.groupName;
|
||||
const groupAvatar = extras.group_avatar || extras.groupAvatar;
|
||||
|
||||
if (conversationId) {
|
||||
const isGroup = conversationType === 'group';
|
||||
@@ -169,6 +170,7 @@ function NotificationBootstrap() {
|
||||
q.set('isGroupChat', '1');
|
||||
if (groupId) q.set('groupId', groupId);
|
||||
if (groupName) q.set('groupName', groupName);
|
||||
if (groupAvatar) q.set('groupAvatar', groupAvatar);
|
||||
} else if (senderId) {
|
||||
q.set('userId', senderId);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user