@@ -10,17 +10,17 @@ The `+tinycomments_fetch_author_info+` function is passed a request (`+req+`) ob
1010The function must call `+done+` with an object containing the following properties:
1111
1212* `+author+` (`+string+`): A unique identifier for the user.
13- * `+authorName+` (`+string+`): The full name to display for the user.
14- * `+authorAvatar+` (`+string+`): A URL pointing to the user's avatar image.
13+ * `+authorName+` (`+string+`): The full name to display for the user. (`optional`)
14+ * `+authorAvatar+` (`+string+`): A URL pointing to the user's avatar image. (`optional`)
1515
1616.Example of `+tinycomments_fetch_author_info+` function
1717[source,js]
1818----
1919const tinycomments_fetch_author_info = (_, done) => {
2020 setTimeout(() => done({
2121 author: currentUser.id, // Maps to the `author` field in the comment object
22- authorName: currentUser.fullName, // Maps to the `authorName` field in the comment object
23- authorAvatar: currentUser.image, // Maps to the `authorAvatar` field in the comment object
22+ authorName: currentUser.fullName, // Maps to the `authorName` field in the comment object. (optional)
23+ authorAvatar: currentUser.image, // Maps to the `authorAvatar` field in the comment object. (optional)
2424 }), fakeDelay);
2525};
2626----
@@ -42,8 +42,8 @@ const tinycomments_fetch_author_info = (_, done) => {
4242 .then(currentUser => {
4343 done({
4444 author: currentUser.id, // Maps to the `author` field in the comment object
45- authorName: currentUser.fullName, // Maps to the `authorName` field in the comment object
46- authorAvatar: currentUser.image, // Maps to the `authorAvatar` field in the comment object
45+ authorName: currentUser.fullName, // Maps to the `authorName` field in the comment object. (optional)
46+ authorAvatar: currentUser.image, // Maps to the `authorAvatar` field in the comment objectv. (optional)
4747 });
4848 });
4949};
0 commit comments