Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: location does not display in inbox conversation #704

Merged
merged 4 commits into from
Feb 7, 2025

Conversation

abdou6666
Copy link
Member

Motivation

This PR fixes a bug where when user sends their location it displays empty message in the inbox

Fixes #352

Type of change:

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added unit tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@abdou6666 abdou6666 self-assigned this Feb 6, 2025
@abdou6666
Copy link
Member Author

image

@abdou6666 abdou6666 marked this pull request as ready for review February 6, 2025 12:51
@abdou6666 abdou6666 marked this pull request as draft February 6, 2025 13:19
@abdou6666
Copy link
Member Author

image

@abdou6666 abdou6666 requested a review from marrouchi February 6, 2025 16:48
@abdou6666 abdou6666 marked this pull request as ready for review February 6, 2025 16:49
@marrouchi marrouchi requested review from IkbelTalebHssan and yassinedorbozgithub and removed request for marrouchi February 7, 2025 07:02
Copy link
Contributor

@marrouchi marrouchi left a comment

Choose a reason for hiding this comment

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

Looks good, left a few comments.

const GeolocationMessage: React.FC<GeolocationMessageProps> = ({ message }) => {
const iframeRef = useRef<HTMLDivElement>(null);

if (!("coordinates" in message)) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

From my understanding any code after this check will have an existing message.coordinates and based on the StdIncomingLocationMessage type the lat and the lon are required fields.

I'm thinking, it is maybe required to test the existing of required fields and give them default values
or/and it's a adaption step to transform the response to a standard format 0 => 0.0
or/and it's better to a have a type adapted to the location response with optional props lat, lon

Copy link
Collaborator

@IkbelTalebHssan IkbelTalebHssan left a comment

Choose a reason for hiding this comment

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

LGTM 🚀
image

@marrouchi marrouchi merged commit fc56c95 into main Feb 7, 2025
5 checks 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] - Received Location Fails to Display in Inbox Conversation
4 participants