mirror of
https://github.com/hexastack/hexabot
synced 2025-06-26 18:27:28 +00:00
fix: locatation refactor
This commit is contained in:
parent
3d974356d0
commit
71864ba7ce
@ -139,9 +139,10 @@ export class ConversationService extends BaseService<
|
||||
const msg = event.getMessage();
|
||||
if (msgType === 'location' && 'coordinates' in msg) {
|
||||
const coordinates = msg.coordinates;
|
||||
convo.context.user_location = { lat: 0, lon: 0 };
|
||||
convo.context.user_location.lat = parseFloat(coordinates.lat.toString());
|
||||
convo.context.user_location.lon = parseFloat(coordinates.lon.toString());
|
||||
convo.context.user_location = {
|
||||
lat: parseFloat(coordinates.lat.toString()),
|
||||
lon: parseFloat(coordinates.lon.toString()),
|
||||
};
|
||||
} else if (msgType === 'attachments') {
|
||||
// @TODO : deprecated in favor of geolocation msgType
|
||||
const attachments = event.getAttachments();
|
||||
|
Loading…
Reference in New Issue
Block a user