matrix-org / matrix-static Goto Github PK
View Code? Open in Web Editor NEWA static golang generated preview of public world readable Matrix rooms.
Home Page: http://view.matrix.org/
License: Apache License 2.0
A static golang generated preview of public world readable Matrix rooms.
Home Page: http://view.matrix.org/
License: Apache License 2.0
to stop spidering accumulating steadily over time until it takes out synapse
Hi, @t3chguy!
I've read about your work at Matrix.org status update
After visiting your Heroku app I would like to ask you, whether you could add a CSS file instead of styling inline? This way, web designers could use Stylish/edit the stylesheet using browser developer tools and send a PR with an updated stylesheet without needing to know, how to build a local version of the website.
Do you have any mockups on how you would like to see the app look like?
The following URL is generated from matrix.to for the matrix-static client:
Calling this redirects to the following, obviously invalid, URL:
(server "matrix.orgroom" cannot be found)
to allow estimating how many servers are dead
as this would allow access to history of rooms without History=Anyone
probably locally rather than via the filtered part of the API
I'd like to run this on a /view/
folder, is that possible?
or maybe we don't care because afaik synapse/whatever will eventually offer to generate them for us
qtc: command not found. No vendor directory.
/servers
and /members
links to rooms rather than the room they are of, fixxy
Right now google is hammering matrix.org by indexing view.matrix.org. Do we ensure that the historical pages have nice unique URLs, Etags and have a suitably massive caching header to ensure that Google doesn't go and try to reindex the whole thing again a few days later?
to get around the public peekable requirement
Zip, Image, Audio, Video files are shown as m.file.Event, instead there should be a link to download that file.
it shouldn't care if there is or isn't a slash there
When starting, matrix-static can panic mid-startup when it's doing it's initial sync of publicRooms:
panic: Get <<REDACTED - client/r0/publicRooms url with access token>>: net/http: request canceled (Client.Timeout exceeded while awaiting headers)
goroutine 1 [running]:
github.com/t3chguy/matrix-static/mxclient.(*Client).NewWorldReadableRooms(0xc4202d90a0, 0xd)
/home/matrixstatic/matrix-static/src/github.com/t3chguy/matrix-static/mxclient/public-rooms.go:53 +0x8d
main.main()
/home/matrixstatic/matrix-static/src/github.com/t3chguy/matrix-static/matrix-static.go:93 +0x368
error: Forever detected script exited with code: 2
This isn't particularly fatal, we can just restart matrix-static until it completes, but adding a longer timeout may be useful here.
[GIN] 2019/02/09 - 11:35:10 | 200 ESC[0m| 985.490869ms | 54.36.148.31 | ESC[0m GET /api/room/!byVSIeqgYCNgmluYKv:outcasts.win/
time="2019-02-09T11:35:36Z" level=info msg="Started Initial Syncing Room" roomID="!AEhkQDKeSJvwkKyIHq:matrix.org" worker=14
time="2019-02-09T11:35:38Z" level=info msg="Finished Initial Syncing Room" roomID="!AEhkQDKeSJvwkKyIHq:matrix.org" worker=14
panic: runtime error: slice bounds out of range
goroutine 41 [running]:
main.RoomMembersJob.Work(0xc4331f01ee, 0x1e, 0x0, 0x14, 0xc420ed7ce0)
/home/matrixstatic/matrix-static/src/github.com/t3chguy/matrix-static/job-room-members.go:41 +0x687
main.(*RoomMembersJob).Work(0xc420dd9540, 0xc420ed7ce0)
<autogenerated>:7 +0x72
main.(*Worker).Start(0xc420ed7ce0)
/home/matrixstatic/matrix-static/src/github.com/t3chguy/matrix-static/workers.go:38 +0x75
created by main.NewWorker
/home/matrixstatic/matrix-static/src/github.com/t3chguy/matrix-static/workers.go:88 +0x141
When linking to this message:
https://view.matrix.org/room/!ChuQQIVJvwyJujhNIG:synapse.keyvan.pw/?anchor=$152456240720927yUzQv:matrix.org&highlight
The event gets placed at the bottom of the scrollback. I think it would be preferred to center the linked event right in the middle of the page. Is that doable? Thanks.
We don't validate that page is >= 0, so we can panic when we attempt to access negative indices in an array.
panic: runtime error: slice bounds out of range
goroutine 61 [running]:
main.RoomMembersJob.Work(0xc4203ae0fe, 0x1e, 0xfffffffffffffffe, 0x14, 0xc420de00c0)
/home/matrixstatic/matrix-static/src/github.com/t3chguy/matrix-static/job-room-members.go:41 +0x687
main.(*RoomMembersJob).Work(0xc421ae0420, 0xc420de00c0)
:7 +0x72
main.(*Worker).Start(0xc420de00c0)
/home/matrixstatic/matrix-static/src/github.com/t3chguy/matrix-static/workers.go:38 +0x75
created by main.NewWorker
/home/matrixstatic/matrix-static/src/github.com/t3chguy/matrix-static/workers.go:88 +0x141
Long way off but I'd love to see the UI of logbot (IRC log viewer) incorporated into matrix-static
You can see it running here: https://mozilla.logbot.info/firefox/20181114
At now Matrix Static can display rooms with messages, but there are no way to display only one specific message. Will be good to have ability for display only one message in webpage by message id.
It would be nice if it could handle room upgrades in a similar way to Riot's interface. An example of an upgraded room is https://view.matrix.org/room/!FyQrGcOoVamcLcvdob:matrix.org/ to https://view.matrix.org/room/!yjVgJUsMLYLAONsoii:jki.re/
I only found out about /aliases
by accident, and was otherwise left quite confused trying to join a room I found on view.matrix.org
. A fat button in the top right taking me to matrix.to
might make sense. Thanks for your consideration.
Primary errors seem to be not including an alt
attribute on <img>
tags and using using nowrap
attribute on <td>
element is considered obsolete.
I'm not really sure what we should be putting as image alt-texts, but according to w3, something does have to be there.
I feel like the horrific hack to work around the federation peeking issue is to have static try and register a guest account on whatever HS it's trying to look at (probably (and horrifically) based on room id) - Cadair
https://view.matrix.org/?page=0
Around fifty seconds to load finish when e.g. the network console is open, in Firefox 71.0, before loading the page.
Then a waiting period before the application becomes responsive, but this is probably an issue with Firefox. Screen recording:
2019-12-30 15:45 Firefox 71.0.zip
Not so long when web developer tools are in use but still, it's remarkably slow to load in some browsers.
proposal: matrix-org/matrix-spec-proposals#1704
Matrix-static should match the events displayed by Riot probably. Splitting out from #41
it looks to me like matrix-static should display "Cannot Understand Event" when it gets an event with a type it doesn't recognize, but instead, it just doesn't display that event.
to prevent people running in wrong working directory and wondering why it looks even worse :(
m.room.history_visibility
Renderers for common events:
m.text
/m.emote
/m.notice
Renderers for room state changes:
I opened this message direct link from Jul 5
https://view.matrix.org/room/!wSdymYrEpBhsWlDJuk:decred.org/?anchor=$153090455433548QNlFj:decred.org
and it showed "Some error has occurred". Then I removed the anchor part from the URL to open latest messages in the room and pressed "Load older messages" until I reached Jul 5 and it showed the message I was after. Then I visited initial direct link again and it opened.
Example of direct link that doesn't work (until someone visits it via "Load older messages"):
https://view.matrix.org/room/!OfChXgczrIlpEZSFAv:decred.org/?anchor=$153125687135698lmQRO:decred.org
Should probably fall back to something, otherwise the list looks weird: https://view.matrix.org/room/!zxWLnBMJtBomyQlnRV:tang.ents.ca/members?page=1 (see bottom or page 2)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.