-
Notifications
You must be signed in to change notification settings - Fork 13
feat: New conversation composer + refactor and fix profile socials + many other chat related fixes #1569
Conversation
Performance Comparison ReportSignificant Changes To DurationThere are no entries Meaningless Changes To DurationShow entries
Show details
Render Count ChangesThere are no entries Render IssuesThere are no entries Added ScenariosThere are no entries Removed ScenariosThere are no entries |
queries/use-conversations-query.ts
Outdated
}; | ||
|
||
const getConversations = async ( | ||
args: IArgs & { | ||
// We want to track who's making new calls to the network | ||
caller: string; | ||
} | ||
) => { | ||
): Promise<ConversationWithCodecsType[]> => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😢
queries/use-conversations-query.ts
Outdated
|
||
const conversationsWithMembers = await Promise.all( | ||
conversations.map(async (c) => { | ||
const members = await c.members(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
export function fetchOrGetGroupMembers (args: {
account: string;
topic: ConversationTopic;
}): Promise {
const members = getGroupMembersQueryData({ account, topic });
if (!members) {
return fetchGroupMembers(args);
}
return members
}
queries/use-conversations-query.ts
Outdated
// Map conversations list to an array of ConversationWithCodecsType by | ||
// fetching members for each conversation | ||
|
||
const conversationsWithMembers = await Promise.all( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
try catch
if (!members.length) { | ||
return undefined; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The function currently returns undefined
for empty arrays but the test expects it to throw an error. To maintain consistency with the test suite, this function should throw an Error
with a descriptive message like Cannot generate hash for empty members array
. This will also provide clearer feedback when invalid input is provided.
Spotted by Graphite Reviewer
Is this helpful? React 👍 or 👎 to let us know.
5436f11
to
f2e15e5
Compare
…te and tdd the rest
… rules; time for ui
f2e15e5
to
654c1be
Compare
@thierryskoda made this loom quickly going over the meat and potatoes https://www.loom.com/share/acc615ce8db0450ca6023dd83b07645e