Add rocket chat user id field and show messages from linked user id on non-admin accounts
This commit is contained in:
@@ -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
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user