Page MenuHomePhabricator

[Hackathon 2022] Integrate Matrix chat with Wikipedia
Open, Needs TriagePublic


Integrate Matrix with Wikipedia to be used as a backchannel and newcomer support tool.

Volunteers welcome! Some of these are newcomer-friendly.

Event Timeline

@Tgr looks like an easy framework to write bots. Is there a list of bots that you think would be needed? Searching for Wiki article is one thing I could think of. Or adding links for Wikidata Q-IDs?

Someone would have to take stock of the current IRC / Slack / Discord bots (some IRC bots are documented at wikitech:Category:Bots) and see which of those would make sense for Matrix. I think the most common tasks are responding to !help and such, and handling wikilinks / phab IDs / QIDs.

Lectrician1 added a subscriber: Lectrician1.

I had this same idea myself! However I wanted to take it to a scale that is much larger than this task probably plans by allowing any talk page to create its own Matrix chat. That way individual WikiProjects can have their own chats and there not just a wiki-wide one.

Also, the chat history would be stored in Mediawiki itself so that it could be indexed and searched for publicly. This contrasts to a platform like Discord which is not public and compares to Reddit which is, making answer-finding much easier for people as almost all wiki communication would be public.

@Lectrician1 I assume this would also require a Mediawiki extension to have embedded Matrix chats. Something like Element ( can probably run in an Iframe, but it would probably be nicer if there were a frontend that integrates into Mediawiki.

@Tobias1984 Yes, a Mediawiki extension that would provide a user interface, store messages in a database, and be compatible with the Matrix protocol is what I would envision.

@Lectrician1 T312707: Embed a Matrix-based chat panel into Wikipedia as a newcomer support tool is about embedding Matrix chat in Wikimedia pages (though as a popup/overlay, not page content).

Matrix is essentially an eventually-consistent distributed database of channel histories, so trying to make that interface with the MediaWiki database (ie. implementing the Matrix server-server API in PHP) seems both unrealistic and pointless to me. OTOH there are several PHP implementations of the client-server API (artyom-poptsov/matrix-php, coletivoEITA/matrix-php-sdk, meet-kinksters/php-matrix-sdk) although not sure how mature they are; worst case, writing your own implementation of the client-server API is far easier than doing it for the server-server API. So what you'd probably want is to run your own homeserver (so you have control over the DB where the messages are stored) and make MediaWiki connect to it as a client.

Mkay thank you for the better solution Tgr!