mautrix / imessage

A Matrix-iMessage puppeting bridge
https://go.mau.fi/mautrix-imessage/
GNU Affero General Public License v3.0
332 stars 36 forks source link

[bluebubbles] Implement ResolveIdentifier #150

Closed cnuss closed 5 months ago

cnuss commented 5 months ago

https://github.com/mautrix/imessage/commit/c314edf39987a4f30064e16dc30ded206db02ca0#diff-add0e027970853876947ede515fd2419541057010ed0cfb334f30219fcd9979fR135

trek-boldly-go commented 5 months ago

I have an implementation of this that works, but it doesn't really do any validation. It looks for an @ symbol, and if it doesn't find it, it scrubs all non-numeric chars, then prepends iMessage;-;+ to the number. If it finds the @ symbol, it doesn't do any cleanup and prepends iMessage;-; (notice the lack of +). More validation runs the risk of failure on valid use cases, so this implementation is probably the best option for now.