feat: add direct message link (#12138)

* feat: add direct message link

/message/:mid
add /:index? to chat routes
add copy link to chat messages
add messageCount to each room object
add infinitescroll in both directions to chat

* fix more tests

* test: more text fixes

* test: fix tests

* remove async

* dont crash if element not in dom

clamp scrollToIndex values to 0, msgCount
This commit is contained in:
Barış Soner Uşaklı
2023-10-31 10:15:06 -04:00
committed by GitHub
parent 7a8c27bf90
commit 4c4f3ac983
18 changed files with 236 additions and 44 deletions

View File

@@ -281,7 +281,7 @@ describe('API', async () => {
await flags.create('post', 2, unprivUid, 'sample reasons', Date.now()); // for testing flag notes (since flag 1 deleted)
// Create a new chat room
await messaging.newRoom(1, { uids: [2] });
await messaging.newRoom(adminUid, { uids: [unprivUid] });
// Create an empty file to test DELETE /files and thumb deletion
fs.closeSync(fs.openSync(path.resolve(nconf.get('upload_path'), 'files/test.txt'), 'w'));