mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-03 04:25:55 +01:00
Fullname in notifications (#10157)
* init - fullname notifications setting * fullname in topic reply * fullname for group-request-membership * fullname for group-leave notification * fullname for new-post-flag & new-user-flag * removed log * fullname for user follow * fullname in message notification * fullname in follow * fullname for sendNotificationToPostOwner * fullname in sendNotificationToTopicOwner * fullname in doExport * shorthand name set * shorter name set * fullname in notifications * displayname for notifications * removed unused require
This commit is contained in:
@@ -137,9 +137,11 @@ usersAPI.follow = async function (caller, data) {
|
||||
});
|
||||
|
||||
const userData = await user.getUserFields(caller.uid, ['username', 'userslug']);
|
||||
const { displayname } = userData;
|
||||
|
||||
const notifObj = await notifications.create({
|
||||
type: 'follow',
|
||||
bodyShort: `[[notifications:user_started_following_you, ${userData.username}]]`,
|
||||
bodyShort: `[[notifications:user_started_following_you, ${displayname}]]`,
|
||||
nid: `follow:${data.uid}:uid:${caller.uid}`,
|
||||
from: caller.uid,
|
||||
path: `/uid/${data.uid}/followers`,
|
||||
|
||||
Reference in New Issue
Block a user