Add rocket chat user id field and show messages from linked user id on non-admin accounts

This commit is contained in:
2025-09-01 18:46:59 -04:00
parent 5dcd19e7f3
commit 7938c50762
5 changed files with 256 additions and 49 deletions

View File

@@ -108,7 +108,7 @@ app.get('/me', async (req, res) => {
// Get user details from database
const userResult = await pool.query(
'SELECT id, username, email, is_admin, is_active FROM users WHERE id = $1',
'SELECT id, username, email, is_admin, rocket_chat_user_id, is_active FROM users WHERE id = $1',
[decoded.userId]
);
@@ -135,6 +135,7 @@ app.get('/me', async (req, res) => {
id: user.id,
username: user.username,
email: user.email,
rocket_chat_user_id: user.rocket_chat_user_id,
is_admin: user.is_admin,
permissions: permissions
});