Skip to content

fix: save call history log entries for both caller and receiver#71

Merged
Atanu2k4 merged 2 commits into
sanks011:masterfrom
Atanu2k4:master
Jun 6, 2026
Merged

fix: save call history log entries for both caller and receiver#71
Atanu2k4 merged 2 commits into
sanks011:masterfrom
Atanu2k4:master

Conversation

@Atanu2k4

@Atanu2k4 Atanu2k4 commented Jun 6, 2026

Copy link
Copy Markdown
Collaborator

Summary

Fixes an issue where call history was only visible to the participant who triggered the log creation (typically the caller or whoever hung up). The endpoint now writes two mirrored entries to the database simultaneously so that both participants have the call registered in their personal history logs.

Related issue

Fixes #70

Changes

  • Modified route.ts
    • Replaced the single CallLog.create() invocation with CallLog.insertMany() to atomically create logs for both users.
    • Added logic to resolve a mirrorType (swapping outgoingincoming) for the receiving participant.

Testing

  • Sent test POST payloads to /api/calls/logs.
  • Verified that two documents are correctly created in MongoDB.
  • Verified that the caller has an outgoing type log and the receiver has an incoming type log.

Checklist

  • Title follows the repository PR format
  • The issue is linked with Fixes #70
  • Testing notes are included

@github-actions

github-actions Bot commented Jun 6, 2026

Copy link
Copy Markdown

PR Validation Passed

Your PR title and description meet all requirements:

@Atanu2k4 Atanu2k4 merged commit d8c2be8 into sanks011:master Jun 6, 2026
1 check passed
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.

bug: call history only visible to one participant - receiver log missing

1 participant