matrix-org / matrix.to

A simple stateless privacy-protecting URL redirecting service for Matrix
http://matrix.to
Apache License 2.0
893 stars 189 forks source link

FreeBSD is detected as Windows #187

Open grahamperrin opened 3 years ago

grahamperrin commented 3 years ago
grahamperrin@mowa219-gjp4-8570p:~ % date ; uname -v
Wed 30 Dec 2020 07:04:36 GMT
FreeBSD 13.0-CURRENT #74 r368589: Sun Dec 13 07:55:46 GMT 2020     root@mowa219-gjp4-8570p:/usr/obj/usr/src/amd64.amd64/sys/GENERIC-NODEBUG 
grahamperrin@mowa219-gjp4-8570p:~ % pkg query '%o %v %R' firefox nhecko quaternion
www/firefox 84.0.1,2 FreeBSD
net-im/quaternion 0.0.9.5.b1 FreeBSD
grahamperrin@mowa219-gjp4-8570p:~ % 

– Quaternion is installed.

There's no Continue button for Quaternion:

image

https://matrix.to/#/!GXVxxBXHdVSnlqylVX:riot.ovh/$TGBeI9bNLhoNEjdaTMriQ3XtA667BxZzeX5bUkGG_bE

Preferences cleared, no improvement.

t3chguy commented 3 years ago

A webapp can't detect the existence of a desktop app. It should give you the command to run though

grahamperrin commented 3 years ago

Thanks

$ uname -sr
FreeBSD 13.0-CURRENT
$ which quaternion
/usr/local/bin/quaternion
$
t3chguy commented 3 years ago

image

I cannot reproduce, mine shows me the command to run.

grahamperrin commented 3 years ago

Maybe it's a user agent thing …

grahamperrin commented 3 years ago

@t3chguy please, what's your UA string?

I experimented with this, no improvement:

Mozilla/5.0 (X11; Linux x86_64; rv:84.0) Gecko/20100101 Firefox/84.0

t3chguy commented 3 years ago

Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0 is mine

grahamperrin commented 3 years ago

Thanks. No different for me with that UA string.

Incidentally I'm using Custom UserAgent String to apply the override to the https://matrix.to/ domain alone.

bwindels commented 2 years ago

Can you still reproduce this @grahamperrin ?

bwindels commented 2 years ago

If so, I assume navigator.platform returns something like FreeBSD, which https://github.com/matrix-org/matrix.to/blob/main/src/Platform.js#L51 will turn into Windows :see_no_evil: