Skip to content

Commit

Permalink
Fetch user details for users in your message activity feed (#6686)
Browse files Browse the repository at this point in the history
  • Loading branch information
hpeebles authored Oct 25, 2024
1 parent 5cfb399 commit ce3d93f
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions frontend/openchat-client/src/openchat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1450,11 +1450,22 @@ export class OpenChat extends OpenChatAgentWorker {
});
}

messageActivityFeed(): Promise<MessageActivityFeedResponse> {
return this.sendRequest({
async messageActivityFeed(): Promise<MessageActivityFeedResponse> {
const feed = await this.sendRequest({
kind: "messageActivityFeed",
since: this._liveState.globalState.messageActivitySummary.readUpToTimestamp,
});

const userIds = new Set<string>();
for (const event of feed.events) {
if (event.userId !== undefined) {
userIds.add(event.userId);
}
}

await this.getMissingUsers(userIds);

return feed;
}

async approveAccessGatePayment(
Expand Down

0 comments on commit ce3d93f

Please sign in to comment.