| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Reviewer's GuideIntroduces a findChatByRemoteJid endpoint by adding a route, controller method, and service query to fetch chat records by phone number with validation and error handling. Sequence diagram for the new findChatByRemoteJid API endpointsequenceDiagram
actor User
participant API as ChatRouter
participant Controller as ChatController
participant Service as ChannelStartupService
participant DB as PrismaRepository
User->>API: GET /findChatByRemoteJid?remoteJid=...
API->>API: Validate remoteJid
API->>Controller: findChatByRemoteJid(instance, remoteJid)
Controller->>Service: findChatByRemoteJid(remoteJid)
Service->>DB: chat.findFirst({ instanceId, remoteJid })
DB-->>Service: Chat record or null
Service-->>Controller: Chat record or null
Controller-->>API: Chat record or null
API-->>User: 200 OK (chat data) or error
Class diagram for new and updated methods in chat retrievalclassDiagram
class ChatRouter {
+get('findChatByRemoteJid', ...)
}
class ChatController {
+findChatByRemoteJid(instance: InstanceDto, remoteJid: string)
}
class ChannelStartupService {
+findChatByRemoteJid(remoteJid: string)
}
ChatRouter --> ChatController : calls
ChatController --> ChannelStartupService : calls
File-Level Changes
Tips and commands Interacting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
This PR introduces a new API endpoint called findChatByRemoteJid, which allows retrieving chat information using a phone number (identified internally as remoteJid).
What's included:
This functionality will be useful for querying specific chats directly by their associated phone number.
Summary by Sourcery
Add a new API endpoint to retrieve chat records by remoteJid, including route, controller, and service implementations with input validation and error handling.
New Features: