Skip to content

Conversation

@javiercr
Copy link
Contributor

@javiercr javiercr commented Jan 22, 2024

Context

Description

Fetches subscribed newsletters after connect and creates DBThread for them.

const subscribedNewsletters = await this.client?.getSubscribedNewsletters()
if (subscribedNewsletters) {
await Promise.all(subscribedNewsletters.map(async newsletter => {
const thread = new DBThread()
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it right to use DBThread here or should we introduce a new DBNewsletter model?

Comment on lines +1164 to +1168
chat: {
id: newsletter.id,
name: newsletter.threadMetadata.name.text,
createdAt: newsletter.threadMetadata.creationTime,
},
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: map remaining props here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants