3 |

4 |
A chat bridge allowing users to post, reply and interact with discourse posts from their own favorite chat platforms.
5 |
Installation
6 |
7 |
8 | ## Bridge Features
9 |
10 | - fetch the latest published topic 📄
11 | - fetch categories ⬇️
12 | - Post a new topic 📝
13 | - Post a new comment 💬
14 | - Send a private message 🔒
15 | - Link your chat account with your discussion account
16 | - Receive the latest topics posted from the bot
17 |
18 | ## Supported platforms
19 | - Matrix
20 | - Telegram
21 |
22 | ## License
23 | Discourse-chat-bridge is licensed under the AGPLv3.
24 |
25 | 
--------------------------------------------------------------------------------
/docs/source/installation.md:
--------------------------------------------------------------------------------
1 | # Installation
2 |
3 | ## Discourse setup
4 | Go to Admin Settings > API and create a new API key.
5 | It should have a granular scope and be able to access all users.
6 | Make sure you also give the token topics write access.
7 |
8 | 
9 |
10 | ### installation with docker-compose.yml
11 | ```yaml
12 | services:
13 | discourse-chat-bridge:
14 | image: oci.aosus.org/aosus/discourse-chat-bridge:latest
15 | restart: always
16 | environment:
17 | URL: "https://discourse.example.com"
18 | DISCOURSE_FORUM_NAME: "Discourse community"
19 | DISCOURSE_TOKEN: "API key with write access for all users"
20 | DISCOURSE_USERNAME: "username to be used for Direct messages from the bridge"
21 | TELEGRAM_TOKEN: ""
22 | MATRIX_USERNAME: ""
23 | #MATRIX_PASSWORD: "" matrix password shouldn't beused in env variables, rather you should directly set the access token.
24 | MATRIX_HOMESERVER_URL: "https://matrix.example.com"
25 | MATRIX_ACCESS_TOKEN: ""
26 | MATRIX_AUTOJOIN: TRUE
27 | DATAPATH: /data
28 | MATRIX_ENCRYPTION: TRUE
29 | language: "en"
30 | volumes:
31 | - ./data:/data:z
32 | ```
33 |
34 | Then you can start the container
35 | ```bash
36 | docker compose up -d
37 | ```
38 |
39 | ## Native
40 | ```bash
41 | git clone https://github.com/aosus/discourse-chat-bridge
42 | ```
43 |
44 | edit `config.json` and add required inputs
45 | ```json
46 | {
47 | "url": "https://$DISCOURSE_DOMAIN",
48 | "discourse_forum_name": "discourse forum name",
49 | "discourse_token": "API key with write access for all users",
50 | "discourse_username": "username to be used for Direct messages from the bridge",
51 | "telegram_token": "",
52 | "matrix_username": "Username to your Matrix account #aosus",
53 | "matrix_password": "Password to your Matrix account to generate the access token, you can skip this by inputing it directly",
54 | "matrix_homeserver_url": "https://matrix.org",
55 | "matrix_access_token": "Put your matrix_access_token here #npm run generate_matrix_token",
56 | "matrix_autojoin": true,
57 | "dataPath": "./storage",
58 | "matrix_encryption": true,
59 | "language": "en"
60 | }
61 | ```
62 |
63 | Then start it up!
64 |
65 | ```bash
66 | npm i
67 | npm run generate_matrix_token
68 | npm start
69 | or
70 | node index.js
71 | ```
72 |
--------------------------------------------------------------------------------
/docs/source/usage.md:
--------------------------------------------------------------------------------
1 | # Usage
2 |
3 | ## Bot commands
4 |
5 | | Command | description|
6 | |:--------------|-----------------:|
7 | | start | Start the bot |
8 | | discourse | Link your Discourse account |
9 | | get_latest_posts | Fetch and display the latest posts |
10 | | getCategories | List available categories |
11 | | CreatePosts | Create a new post |
12 | | sendComment | Send a comment on an existing post |
13 | | sendMessagePrivate | Send a private message |
14 | | activation | Activate notifications for new posts |
15 |
--------------------------------------------------------------------------------
/docs/source/عربي/index.md:
--------------------------------------------------------------------------------
1 | # الرئيسية
2 |