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:
Magnus
2022-01-19 16:19:11 +01:00
committed by GitHub
parent 857ac48021
commit 7bd3e31dec
9 changed files with 36 additions and 19 deletions

View File

@@ -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`,