Make click-to-note safer to use.
Include the username to avoid noting messages from user B on user A.pull/9536/head
parent
c040432554
commit
3f76213071
|
@ -39,8 +39,11 @@ $(function () {
|
|||
});
|
||||
|
||||
$('#communication').on('click', '.line.author, .post.author', function () {
|
||||
// Need to take username from the communcation page so that when being in inquiry for user A and checking communication of user B
|
||||
// the notes cannot be mistakenly attributed to user A.
|
||||
const username = $('#communication').find('.title').text().split(' ')[0];
|
||||
const message = $(this).find('.message').text();
|
||||
const storedNote = noteStore.get();
|
||||
noteStore.set((storedNote ? storedNote + ', ' : '') + `"${message}"`);
|
||||
noteStore.set((storedNote ? storedNote + ', ' : '') + `${username}: "${message}"`);
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue