Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,18 @@ bun install
> [!WARNING]
> The authorized redirect URIs in Google Cloud Console must match **exactly** what you configure in the `.env`, including the protocol (http/https), domain, and path - these are provided above.

3. **Autumn Setup** (Required for some encryption)

-Go to [Autumn](https://useautumn.com/)
-For Local Use, click [onboarding](https://app.useautumn.com/sandbox/onboarding) button and generate an Autumn Secret Key
-For production, select the production mode from upper left corner and generate an fill the other fields. After that, generate an Autumn Secret Key
- Add to `.env`:

```env
AUTUMN_SECRET_KEY=your_autumn_secret
```


### Environment Variables

Copy `.env.example` located in the project folder to `.env` in the same folder and configure the following variables:
Expand Down
4 changes: 3 additions & 1 deletion apps/mail/hooks/use-billing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,12 @@ export const useBilling = () => {
const { attach, track, openBillingPortal } = useAutumn();

const customerFeatures = useMemo(() => {
if (!customer) return DEFAULT_FEATURES;
if (!customer || !customer.features || !Array.isArray(customer.features)) return DEFAULT_FEATURES;

const features = customer.features.reduce(
(acc: Features, feature: Feature) => {
if (!feature) return acc;

const id = feature.feature_id;
if (id === FEATURE_IDS.CHAT) {
acc.chatMessages = {
Expand Down