Matrix: Difference between revisions
Piscimisty (talk | contribs) bridging and link to guides |
m Make the sticker pack widget json more copy-pastable. |
||
(14 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
[[File:Matrix_logo.svg|120px]] | |||
Matrix is an open-standard, encrypted, and federated chat protocol. Clients exist for multiple platforms, including iOS, Android, Windows, Mac, and Linux. The standard client is called Element, and can be downloaded at https://element.io/download. A web interface hosted by us can be found at [https://chat.pub.solar/ chat.pub.solar]. | Matrix is an open-standard, encrypted, and federated chat protocol. Clients exist for multiple platforms, including iOS, Android, Windows, Mac, and Linux. The standard client is called Element, and can be downloaded at https://element.io/download. A web interface hosted by us can be found at [https://chat.pub.solar/ chat.pub.solar]. | ||
== | == Overview == | ||
This page will focus on setting up Matrix. It is divided into several sections: | |||
; [[Matrix#Setting up|Setting up]]: Signing into your Matrix client | |||
; [[Matrix#Bridging|Bridging]]: Setting up bridges to third-party / proprietary platforms. | |||
; [[Matrix#Tips and Tricks|Tips and Tricks]]: How to enable some niceties. | |||
; [[Matrix#Clients|Clients]]: Using a third-party app to connect to Matrix. | |||
=== Learn More === | |||
More information on Matrix can be found on: | More information on Matrix can be found on: | ||
Line 15: | Line 25: | ||
The first time you log in, you'll be asked to save your encryption keys. ''Make sure to write these down in a secure location!'' We recommend using a password manager. Matrix messages are end-to-end encrypted, which means that the administrators of pub.solar cannot read their contents. However, if you lose your encryption keys you'll lose access to all previous messages. | The first time you log in, you'll be asked to save your encryption keys. ''Make sure to write these down in a secure location!'' We recommend using a password manager. Matrix messages are end-to-end encrypted, which means that the administrators of pub.solar cannot read their contents. However, if you lose your encryption keys you'll lose access to all previous messages. | ||
=== Bridging | === Cross-device verification === | ||
Cross-device verification lets you share keys between devices, allowing two trusted devices to automatically be trusted by your contacts. The process is straightforward, either by scanning a QR code, or manually compare a few emojis (or words) to make sure both your devices show the same set. To learn more, read the [https://element.io/features/device-verification overview] or the [https://element.io/help#encryption11 guide] by Element. | |||
Initiating this process differs per client. | |||
* On Element, cross-device verification is prompted when you log into a new device. | |||
== Bridging == | |||
Proprietary chat services such as Discord, Telegram, and WhatsApp can be bridged to Matrix, allowing you to communicate with users on the target network. | Proprietary chat services such as Discord, Telegram, and WhatsApp can be bridged to Matrix, allowing you to communicate with users on the target network. | ||
Currently, we offer Telegram and IRC bridges for our users. Otherwise, several public bridges are available, such as [https://t2bot.io t2bot] for Discord and Telegram. | |||
=== Telegram === | |||
Currently, only puppeting is enabled on this instance. | |||
To set up puppeting for your Telegram account: | |||
# Create a direct chat with [https://matrix.to/#/@telegrambot:pub.solar @telegrambot:pub.solar] and wait for it to join. | |||
# Initiate the process by sending <code>login</code>. | |||
# Either follow the link replied to log in via browser, or send your account's phone number directly to the chat. | |||
# Follow further instructions from the bot. | |||
Relay bridging (used to bridge rooms) may be set up in the future. | |||
=== IRC === | |||
As of January 2024, [https://github.com/matrix-org/matrix-appservice-irc IRC bridging] to [https://libera.chat/ Libera Chat] (irc.libera.chat) and [https://interviewfor.red/en/starting.html Scratch IRC] (irc.scratch-network.net) is enabled. | |||
Before reading on, try searching the public room list in your Matrix client to see if there is already an existing bridged room for the IRC channel you would like to join. | |||
To join a channel on IRC from Matrix, simply join the room <code>#_<SERVER>_<CHANNEL></code>, where <code><nowiki><SERVER></nowiki></code> and <code><nowiki><CHANNEL></nowiki></code> correspond to the IRC server and channel on that IRC server. | |||
For example, to join the channel #pkgsrc on libera.chat IRC, join the Matrix room [https://matrix.to/#/#_libera_#pkgsrc:pub.solar #_libera_#pkgsrc:pub.solar]. One way of joining this room is by entering the following command in the chat box of any room in your Matrix client: | |||
/join #_libera_#pkgsrc:pub.solar | |||
To check the IRC bridge status and to control your connection to IRC servers, start a chat with [https://matrix.to/#/@irc_bot:pub.solar @irc_bot:pub.solar]. This is your [https://matrix-org.github.io/matrix-appservice-irc/latest/admin_room.html IRC bridge admin room], where you can set your IRC Nick (username) and store a password if you registered a user on a given IRC server. ''Note that some IRC channels only allow registered users to join.'' Type <code>!help</code> in the chat box to find out available commands in the admin room. | |||
{| class="wikitable" | |||
|+Table of bridged IRC networks | |||
!Network Name | |||
!Room alias format | |||
!Appservice user | |||
|- | |||
|libera.chat | |||
|<code>#_libera_#channame:pub.solar</code> | |||
|[https://matrix.to/#/@irc.libera.chat_NickServ:pub.solar @irc.libera.chat_NickServ:pub.solar] | |||
|- | |||
|Scratch | |||
|<code>#_scratch_#channame:pub.solar</code> | |||
|[https://matrix.to/#/@irc.scratch-network.net_NickServ:pub.solar @irc.scratch-network.net_NickServ:pub.solar] | |||
|} | |||
To check if the number of bridged IRC servers has changed in the mean time, inspect [https://git.pub.solar/pub-solar/infra/src/branch/main/hosts/nachtigall/apps/matrix/irc.nix the Nix configuration] and look for the entries below the line that says: <code>in {</code>. | |||
== Tips and Tricks == | |||
=== Enabling the sticker picker === | |||
To enable the stickerpicker in Element: | |||
# Type <code>/devtools</code> in any chat, and press Enter. [[File:20240922 16h56m33s grim.png|alt=Screenshot of /devtools]] | |||
# Under <code>Other</code>, click <code>Explore account data</code>. [[File:Element-devtools-1.png|alt=Screenshot of Element devtools]] | |||
# Click <code>Send custom account data event</code>[[File:Element-devtools-account-data.png|alt=Screenshot of Element devtools, explore account data section]] | |||
# Enter <code>m.widgets</code> as Event Type [[File:Element-devtools-widgets.png|alt=Element devtools with widget event type]] | |||
# For the Event Content, copy and paste the following JSON text, and replace <code><your-username></code> with your username: | |||
<pre> | |||
{ | |||
"stickerpicker": { | |||
"content": { | |||
"type": "m.stickerpicker", | |||
"url": "https://stickers.chat.pub.solar/?theme=$theme", | |||
"name": "Stickerpicker", | |||
"creatorUserId": "@<your-username>:pub.solar", | |||
"data": {} | |||
}, | |||
"sender": "@<your-username>:pub.solar", | |||
"state_key": "stickerpicker", | |||
"type": "m.widget", | |||
"id": "stickerpicker" | |||
} | |||
} | |||
</pre> | |||
[[File:Element-devtools-event-sent.png|alt=Element devtools, showing "event sent"]] | |||
[[File:Element-chat-select-stickers.png|alt=Element Chat showing sticker picker button]] | |||
Source: [https://github.com/maunium/stickerpicker/wiki/Enabling-the-widget] | |||
== Privacy == | |||
For the latest information, visit our [https://pub.solar/privacy privacy policy]. | |||
=== Deleted events and rooms === | |||
Deleted events (e.g. chat messages) are retained for 7 days before being deleted from the database. | |||
Deleted rooms are also retained for 7 days. | |||
== Clients == | |||
While the official client application is [https://en.wikipedia.org/wiki/Element_(software) Element] ([https://chat.pub.solar/ chat.pub.solar]), you can also use other applications to access Matrix, which may offer different features, a different appearance, and may be more catered to a specific platform. | |||
[https://matrix.org/ecosystem/clients/ | An officially maintained list of clients can be found at the [https://matrix.org/ecosystem/clients/ Matrix.org ecosystem page]. |
Latest revision as of 12:55, 20 November 2024
Matrix is an open-standard, encrypted, and federated chat protocol. Clients exist for multiple platforms, including iOS, Android, Windows, Mac, and Linux. The standard client is called Element, and can be downloaded at https://element.io/download. A web interface hosted by us can be found at chat.pub.solar.
Overview[edit | edit source]
This page will focus on setting up Matrix. It is divided into several sections:
- Setting up
- Signing into your Matrix client
- Bridging
- Setting up bridges to third-party / proprietary platforms.
- Tips and Tricks
- How to enable some niceties.
- Clients
- Using a third-party app to connect to Matrix.
Learn More[edit | edit source]
More information on Matrix can be found on:
Setting up[edit | edit source]
Homeserver address for clients[edit | edit source]
When logging in to clients, you'll have to provide your homeserver address. This is matrix.pub.solar
, not chat.pub.solar
.
Saving your encryption keys[edit | edit source]
The first time you log in, you'll be asked to save your encryption keys. Make sure to write these down in a secure location! We recommend using a password manager. Matrix messages are end-to-end encrypted, which means that the administrators of pub.solar cannot read their contents. However, if you lose your encryption keys you'll lose access to all previous messages.
Cross-device verification[edit | edit source]
Cross-device verification lets you share keys between devices, allowing two trusted devices to automatically be trusted by your contacts. The process is straightforward, either by scanning a QR code, or manually compare a few emojis (or words) to make sure both your devices show the same set. To learn more, read the overview or the guide by Element.
Initiating this process differs per client.
- On Element, cross-device verification is prompted when you log into a new device.
Bridging[edit | edit source]
Proprietary chat services such as Discord, Telegram, and WhatsApp can be bridged to Matrix, allowing you to communicate with users on the target network.
Currently, we offer Telegram and IRC bridges for our users. Otherwise, several public bridges are available, such as t2bot for Discord and Telegram.
Telegram[edit | edit source]
Currently, only puppeting is enabled on this instance.
To set up puppeting for your Telegram account:
- Create a direct chat with @telegrambot:pub.solar and wait for it to join.
- Initiate the process by sending
login
. - Either follow the link replied to log in via browser, or send your account's phone number directly to the chat.
- Follow further instructions from the bot.
Relay bridging (used to bridge rooms) may be set up in the future.
IRC[edit | edit source]
As of January 2024, IRC bridging to Libera Chat (irc.libera.chat) and Scratch IRC (irc.scratch-network.net) is enabled.
Before reading on, try searching the public room list in your Matrix client to see if there is already an existing bridged room for the IRC channel you would like to join.
To join a channel on IRC from Matrix, simply join the room #_<SERVER>_<CHANNEL>
, where <SERVER>
and <CHANNEL>
correspond to the IRC server and channel on that IRC server.
For example, to join the channel #pkgsrc on libera.chat IRC, join the Matrix room #_libera_#pkgsrc:pub.solar. One way of joining this room is by entering the following command in the chat box of any room in your Matrix client:
/join #_libera_#pkgsrc:pub.solar
To check the IRC bridge status and to control your connection to IRC servers, start a chat with @irc_bot:pub.solar. This is your IRC bridge admin room, where you can set your IRC Nick (username) and store a password if you registered a user on a given IRC server. Note that some IRC channels only allow registered users to join. Type !help
in the chat box to find out available commands in the admin room.
Network Name | Room alias format | Appservice user |
---|---|---|
libera.chat | #_libera_#channame:pub.solar
|
@irc.libera.chat_NickServ:pub.solar |
Scratch | #_scratch_#channame:pub.solar
|
@irc.scratch-network.net_NickServ:pub.solar |
To check if the number of bridged IRC servers has changed in the mean time, inspect the Nix configuration and look for the entries below the line that says: in {
.
Tips and Tricks[edit | edit source]
Enabling the sticker picker[edit | edit source]
To enable the stickerpicker in Element:
- Type
/devtools
in any chat, and press Enter. - Under
Other
, clickExplore account data
. - Click
Send custom account data event
- Enter
m.widgets
as Event Type - For the Event Content, copy and paste the following JSON text, and replace
<your-username>
with your username:
{ "stickerpicker": { "content": { "type": "m.stickerpicker", "url": "https://stickers.chat.pub.solar/?theme=$theme", "name": "Stickerpicker", "creatorUserId": "@<your-username>:pub.solar", "data": {} }, "sender": "@<your-username>:pub.solar", "state_key": "stickerpicker", "type": "m.widget", "id": "stickerpicker" } }
Source: [1]
Privacy[edit | edit source]
For the latest information, visit our privacy policy.
Deleted events and rooms[edit | edit source]
Deleted events (e.g. chat messages) are retained for 7 days before being deleted from the database.
Deleted rooms are also retained for 7 days.
Clients[edit | edit source]
While the official client application is Element (chat.pub.solar), you can also use other applications to access Matrix, which may offer different features, a different appearance, and may be more catered to a specific platform.
An officially maintained list of clients can be found at the Matrix.org ecosystem page.