Skip to content

fix: handle Firestore Timestamp objects in formatMessageData#3

Open
ThinhKimVo wants to merge 6 commits intomainfrom
fix/firestore-timestamp-handling
Open

fix: handle Firestore Timestamp objects in formatMessageData#3
ThinhKimVo wants to merge 6 commits intomainfrom
fix/firestore-timestamp-handling

Conversation

@ThinhKimVo
Copy link
Copy Markdown

  • Use serverTimestamp() on write so createdAt is set server-side
  • Use toMillis() when reading Timestamp objects returned by Firestore

- Use serverTimestamp() on write so createdAt is set server-side
- Use toMillis() when reading Timestamp objects returned by Firestore

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
ThinhKimVo and others added 2 commits March 27, 2026 17:49
…pdateUnread

- Use setDoc with merge:true in updateUnread to handle missing conversation docs
- Guard c.members with nullish coalescing to prevent crash in ChatList

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@ThinhKimVo
Copy link
Copy Markdown
Author

example

Screenshot 2026-03-27 at 17 51 10

ThinhKimVo and others added 3 commits March 27, 2026 17:55
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Align encryption.ts with aesCrypto.ts (same API, same algorithm)
- Derive key per conversation using conversationId as salt
- Falls back to conversationId as password when no encryptionKey is provided
- Encrypt text on send, decrypt on receive in useChat

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Match RN cipher format: hex IV (32 chars) + base64 ciphertext
- Use shared password/salt ("saigontechnology@2026") for key derivation
- Remove createUserIfNotExists call for recipient in demo app

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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