-
-
Notifications
You must be signed in to change notification settings - Fork 527
Closed
Labels
bugSomething isn't workingSomething isn't workingdartPull requests that update Dart codePull requests that update Dart codeno-issue-activityNo issue activityNo issue activity
Description
Describe the bug
- The chat functionality in the Talawa app is currently broken due to breaking changes introduced in the backend API. The
ChatMembersConnectionEdgeschema has been modified, causing the mobile app to fail when fetching and processing chat member data.
Root Cause
- PR #3618 in talawa-api introduced breaking changes to the chat members schema:
Previous Schema:
edges: [ChatMembersConnectionEdge]
ChatMembersConnectionEdge {
cursor: String!
node: User # Direct User object
}
New Schema:
edges: [ChatMembersConnectionEdge]
ChatMembersConnectionEdge {
cursor: String!
node: ChatMember # Now returns ChatMember instead of User
}
ChatMember {
role: ChatMembershipRole # New field
user: User # User nested inside ChatMember
}
ChatMembershipRole {
administrator
regular
}
The following queries in chat_queries.dart are affected:
chatsByUser()- Returns members with incorrect structurefetchChatMessagesByChatId()- Cannot properly parse chat membersfetchChatMembers()- Returns ChatMember objects instead of User objects
Expected behavior
The app should:
- Successfully fetch chats with their members
- Display chat member information correctly
- Handle the new ChatMember structure with roles
Actual behavior
- Chats fail to load or display properly
- Member information is not parsed correctly
- New personal or group chats are now able to be created due to incorrect model parsing.
Additional details
- This is a backend breaking change that requires frontend updates
- The change adds role-based functionality to chat members
Potential internship candidates
Please read this if you are planning to apply for a Palisadoes Foundation internship
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingdartPull requests that update Dart codePull requests that update Dart codeno-issue-activityNo issue activityNo issue activity