Skip to content

Commit d69fdd5

Browse files
DOC-2578: The commentAuthor property is now included in reply events for the event log. (#3543)
* DOC-2578: The commentAuthor property is now included in reply events of the event log. * Update modules/ROOT/partials/plugin-apis/comments-apis.adoc * Update modules/ROOT/partials/plugin-apis/comments-apis.adoc * Update modules/ROOT/partials/plugin-apis/comments-apis.adoc * Update modules/ROOT/partials/plugin-apis/comments-apis.adoc * Update modules/ROOT/partials/plugin-apis/comments-apis.adoc * DOC-2578: Update callback demo to include commentAuthor. * Update modules/ROOT/partials/configuration/tinycomments_reply.adoc Co-authored-by: tiny-ben-tran <[email protected]> --------- Co-authored-by: tiny-ben-tran <[email protected]>
1 parent c5f214b commit d69fdd5

File tree

4 files changed

+26
-3
lines changed

4 files changed

+26
-3
lines changed

modules/ROOT/examples/live-demos/comments-callback/example.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,11 @@ const tinycomments_reply = (req, done, fail) => {
4848
})
4949
.then((req2) => {
5050
const commentUid = req2.commentUid;
51-
done({ commentUid });
51+
done({
52+
commentUid: replyUid,
53+
author: currentUser.id,
54+
authorName: currentUser.fullName
55+
});
5256
})
5357
.catch((e) => {
5458
fail(e);

modules/ROOT/pages/7.6.0-release-notes.adoc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,15 @@ The {productname} {release-version} release includes an accompanying release of
102102

103103
**Comments** includes the following fixes and improvements.
104104

105+
==== The `commentAuthor` property is now included in reply events of the event log.
106+
// #TINY-11489
107+
108+
In previous versions of the tinycomments plugin, the `commentAuthor` property was missing from 'reply' events within the event log, which led to incomplete tracking of user interactions when retrieving data through the `+getEventLog()+` API.
109+
110+
{productname} {release-version} addresses this issue. Now, the `commentAuthor` property is included in 'reply' events in the event log.
111+
112+
For more information on the `getEventLog`, see xref:comments-commands-events-apis.adoc#getEventLog[getEventLog].
113+
105114
==== Allow mentions in comments dropdown to flow freely outside of the editor container
106115
// #TINY-11504
107116

modules/ROOT/partials/configuration/tinycomments_reply.adoc

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ The `+done+` callback should accept the following object:
1616
[source,js]
1717
----
1818
{
19-
commentUid: string // the value of the new comment uid
19+
commentUid: string, // the value of the new comment uid
20+
author: string, // the id of the current author
21+
authorName: string // the name of the current author
2022
}
2123
----
2224

@@ -42,7 +44,11 @@ const reply_comment = (ref, done, fail) => {
4244
})
4345
.then((ref2) => {
4446
let commentUid = ref2.commentUid;
45-
done({ commentUid: commentUid });
47+
done({
48+
commentUid: replyUid,
49+
author: currentUser.id,
50+
authorName: currentUser.fullName
51+
});
4652
})
4753
.catch((e) => {
4854
fail(e);

modules/ROOT/partials/plugin-apis/comments-apis.adoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,10 @@ The `getEventLog` returns a log that contains information and timestamps of all
6363
"conversationContent": "new comment (Edit comment)",
6464
"conversationCreatedAt": "2024-10-01T03:07:53.771Z",
6565
"commentContent": "reply to existing comment",
66+
"commentAuthor": {
67+
"author": "DEMO USER",
68+
"authorName": "DEMO USER"
69+
},
6670
"conversationAuthor": {
6771
"author": "DEMO USER",
6872
"authorName": "DEMO USER"

0 commit comments

Comments
 (0)