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

Support location message type #88

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hamzehnasajpour
Copy link

#87

Copy link
Member

@deepbluev7 deepbluev7 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 in general, but I found some small nits. Thank you for working on this!

Comment on lines +184 to +185
if (obj.find("xyz.amorgan.blurhash") != obj.end())
info.blurhash = obj.at("xyz.amorgan.blurhash").get<std::string>();
Copy link
Member

Choose a reason for hiding this comment

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

I think this is wrong. I think only the thumbnail has a blurhash.

{
if (!info.thumbnail_url.empty()) {
obj["thumbnail_url"] = info.thumbnail_url;
obj["thumbnail_info"] = info.thumbnail_info;
Copy link
Member

Choose a reason for hiding this comment

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

I think this should be serialized when a thumbnail_url or a thumbnail_file is present.

Comment on lines +197 to +198
if (!info.blurhash.empty())
obj["xyz.amorgan.blurhash"] = info.blurhash;
Copy link
Member

Choose a reason for hiding this comment

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

(Also not existing, afaik)

Comment on lines +313 to +314
// events::RoomEvent<events::msg::Location> location = e;
// container.emplace_back(location);
Copy link
Member

Choose a reason for hiding this comment

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

I think you can delete these.

Comment on lines +413 to +414
events::RoomEvent<events::msg::Location> location = e;
container.emplace_back(location);
Copy link
Member

Choose a reason for hiding this comment

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

Can you write that in the style of the lines above, i.e.:

Suggested change
events::RoomEvent<events::msg::Location> location = e;
container.emplace_back(location);
container.emplace_back(events::RoomEvent<events::msg::Location>(e));

@LorenDB
Copy link
Member

LorenDB commented Jul 22, 2023

@hamzehnasajpour: ping! Are you still planning to finish this? :)

@hamzehnasajpour
Copy link
Author

@hamzehnasajpour: ping! Are you still planning to finish this? :)

Unfortunately I was so busy and couldn't update and finish it. Is it possible to fix it by you or someone else?

@LorenDB
Copy link
Member

LorenDB commented Aug 22, 2023

Somebody should be able to pick it up. Thank you for providing the initial implementation!

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.

3 participants