sgtaziz / WebMessage

A client for communicating with the WebMessage tweak on iOS. Send and receive messages from the comfort of your computer
73 stars 12 forks source link

[Feature Request] Support for displaying location attachments #47

Open sabogalc opened 3 years ago

sabogalc commented 3 years ago

Here, I have WebMessage and BlueBubbles side-by-side for an example. The first one is censored so as to not reveal my actual location, but in the second photo I zoomed into another location to give a better demonstration. The link in the bottom right corner of the location points to https://leafletjs.com/ Location vcf location

sgtaziz commented 3 years ago

I'll see what I can do!

sabogalc commented 3 years ago

emphasized The tapback notification recognizes the vcf as a location and not a contact, which is good. I'll test vcf files with contacts later.

contact The tapback notification/chat preview seems to recognize contacts too.

zlshames commented 3 years ago

Mine is broken on desktop (and probably Android) because of the code I made to parse the location from the VCF. I was searching for a specific prefix to begin looking for a URL and coordinates on each line of the attachment. The iOS 14 locations seems to not include .URL(;|:)h. I will need to switch it to look for the case where the line just starts with URL

sabogalc commented 3 years ago

I have the content of two different location VCF files below.

BEGIN:VCARD VERSION:3.0 PRODID:-//Apple Inc.//iPhone OS 13.4.1//EN N:;Current Location;;; FN:Current Location item1.URL;type=pref:http://maps.apple.com/?ll=41.8902745\,12.4925427&q=41.8902745\,12.4925427 item1.X-ABLabel:map url END:VCARD

BEGIN:VCARD VERSION:3.0 PRODID:-//Apple Inc.//iPhone OS 14.4//EN N:;Current Location;;; FN:Current Location URL;type=pref:http://maps.apple.com/?ll=-22.951916\,-43.2126759&q=-22.951916\,-43.2126759 END:VCARD

and a contact too

BEGIN:VCARD VERSION:3.0 PRODID:-//Apple Inc.//iPhone OS 14.4//EN N:Contact;Test;;; FN:Test Contact EMAIL;type=INTERNET;type=HOME;type=pref:test@email.com TEL;type=CELL;type=VOICE;type=pref:+1 (555) 555-5555 item1.ADR;type=HOME;type=pref:;;1600 Pennsylvania Ave NW;Washington;DC;20500;United States item1.X-ABADR:us BDAY:1970-01-01 item2.X-ABDATE;type=pref:2020-12-26 item2.X-ABLabel:$!!$ END:VCARD