diff --git a/spec.md b/spec.md index b95914875..a172ae155 100644 --- a/spec.md +++ b/spec.md @@ -17,6 +17,9 @@ while staying compatible to existing MUAs. - [Change group name](#change-group-name) - [Set group image](#set-group-image) - [Set profile image](#set-profile-image) +- [Locations](#locations) + - [User locations](#user-locations) + - [Points of interest](#points-of-interest) - [Miscellaneous](#miscellaneous) @@ -332,6 +335,64 @@ To save data, it is RECOMMENDED to add a `Chat-User-Avatar` header only on image changes. +# Locations + +Locations can be attachted to messages using +[standard kml-files](https://www.opengeospatial.org/standards/kml/) +with well-known names. + + +## User locations + +To send the location of the sender, +the app can attach a file with the name `location.kml`. +The file can contain one or more locations. +Apps that support location streaming will typically collect some location events +and send them together in one file. +As each location has an independent timestamp, +the apps can show the location as a track. + +Note that the `addr` attribute inside the `location.kml` file +MUST match the users email-address. +Otherwise, the file is discarded silently; +this is to protect against getting wrong locations, +eg. forwarded from a normal MUA. + + + + + + 2020-01-11T20:40:19Z + 1.234,5.678 + + + 2020-01-11T20:40:25Z + 7.654,3.21 + + + + + +## Points of interest + +To send an "Point of interest", a POI, +use a normal message and attach a file with the name `message.kml`. +In contrast to user locations, this file should contain only one location +and an address-attribute is not needed - +as the location belongs to the message content, +it is fine if the location is detected on forwarding etc. + + + + + + 2020-01-01T20:40:19Z + 1.234,5.678 + + + + + # Miscellaneous Messengers SHOULD use the header `In-Reply-To` as usual.