nodebb-plugin-mentions 4.3.4 → 4.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/languages/ar/notifications.json +1 -1
- package/languages/bg/notifications.json +1 -1
- package/languages/bn/notifications.json +1 -1
- package/languages/da/notifications.json +1 -1
- package/languages/de/notifications.json +2 -2
- package/languages/el/notifications.json +1 -1
- package/languages/en@pirate/notifications.json +2 -2
- package/languages/en_GB/mentions.json +1 -1
- package/languages/en_GB/notifications.json +4 -3
- package/languages/en_US/notifications.json +2 -2
- package/languages/es/notifications.json +1 -1
- package/languages/et/notifications.json +1 -1
- package/languages/fa_IR/notifications.json +2 -2
- package/languages/fi/notifications.json +1 -1
- package/languages/fr/notifications.json +2 -2
- package/languages/gl/notifications.json +1 -1
- package/languages/he/notifications.json +2 -2
- package/languages/hu/mentions.json +1 -1
- package/languages/hu/notifications.json +2 -2
- package/languages/id/notifications.json +1 -1
- package/languages/it/notifications.json +1 -1
- package/languages/ja/notifications.json +2 -2
- package/languages/jbo/notifications.json +2 -2
- package/languages/ko/notifications.json +1 -1
- package/languages/lt/notifications.json +1 -1
- package/languages/ms/notifications.json +1 -1
- package/languages/nb/notifications.json +2 -2
- package/languages/nl/notifications.json +1 -1
- package/languages/pl/mentions.json +1 -1
- package/languages/pl/notifications.json +2 -2
- package/languages/pt-PT/notifications.json +2 -2
- package/languages/pt_BR/notifications.json +1 -1
- package/languages/ro/notifications.json +1 -1
- package/languages/ru/notifications.json +2 -2
- package/languages/rw/notifications.json +1 -1
- package/languages/sl/notifications.json +1 -1
- package/languages/sr/notifications.json +1 -1
- package/languages/sv/notifications.json +1 -1
- package/languages/tr/notifications.json +2 -2
- package/languages/vi/notifications.json +1 -1
- package/languages/zh-CN/mentions.json +1 -1
- package/languages/zh-CN/notifications.json +2 -2
- package/languages/zh_TW/notifications.json +1 -1
- package/library.js +6 -4
- package/package.json +3 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"mentions": "Erwähnungen",
|
|
3
|
-
"
|
|
4
|
-
"
|
|
3
|
+
"user-mentioned-you-in": "<strong>%1</strong> erwähnte dich in <strong>%2</strong>",
|
|
4
|
+
"user-mentioned-group-in": "<strong>%1</strong> erwähnte <strong>%2</strong> in <strong>%3</strong>",
|
|
5
5
|
"notificationType_mention": "Wenn dich jemand erwähnt"
|
|
6
6
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
"
|
|
2
|
+
"user-mentioned-you-in": "<strong>%1</strong> spoke yer name in <strong>%2</strong>",
|
|
3
|
+
"user-mentioned-group-in": "<strong>%1</strong> called fer <strong>%2</strong> in <strong>%3</strong>"
|
|
4
4
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"mentions": "Mentions",
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"user-mentioned-you-in": "<strong>%1</strong> mentioned you in <strong>%2</strong>",
|
|
4
|
+
"user_mentioned_you_in_room": "<strong>%1</strong> mentioned you in <strong class=\"text-nowrap\"><i class=\"fa %2\"></i>%3</strong>",
|
|
5
|
+
"user-mentioned-group-in": "<strong>%1</strong> mentioned <strong>%2</strong> in <strong>%3</strong>",
|
|
6
|
+
"notificationType-mention": "When someone mentions you"
|
|
6
7
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
"
|
|
2
|
+
"user-mentioned-you-in": "<strong>%1</strong> mentioned you in <strong>%2</strong>",
|
|
3
|
+
"user-mentioned-group-in": "<strong>%1</strong> mentioned <strong>%2</strong> in <strong>%3</strong>"
|
|
4
4
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
"
|
|
2
|
+
"user-mentioned-you-in": "<strong>%1</strong> شما رو در <strong>%2</strong> منشن کرده",
|
|
3
|
+
"user-mentioned-group-in": "<strong>%1</strong> گروه <strong>%2</strong> رو در <strong>%3</strong> منشن کرده"
|
|
4
4
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"mentions": "Mentions",
|
|
3
|
-
"
|
|
4
|
-
"
|
|
3
|
+
"user-mentioned-you-in": "<strong>%1</strong> vous a mentionné dans <strong>%2</strong>",
|
|
4
|
+
"user-mentioned-group-in": "<strong>%1</strong> a mentionné <strong>%2</strong> dans <strong>%3</strong>",
|
|
5
5
|
"notificationType_mention": "Lorsque quelqu'un vous mentionne"
|
|
6
6
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"mentions": "אזכורים",
|
|
3
|
-
"
|
|
4
|
-
"
|
|
3
|
+
"user-mentioned-you-in": "<strong>%1</strong> הזכיר אותך ב <strong>%2</strong>",
|
|
4
|
+
"user-mentioned-group-in": "<strong>%1</strong> הזכיר את <strong>%2</strong> ב <strong>%3</strong>",
|
|
5
5
|
"notificationType_mention": "כאשר מישהו מזכיר אותך"
|
|
6
6
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"mentions": "Megemlítések",
|
|
3
|
-
"
|
|
4
|
-
"
|
|
3
|
+
"user-mentioned-you-in": "<strong>%1</strong> megemlített téged itt: <strong>%2</strong>",
|
|
4
|
+
"user-mentioned-group-in": "<strong>%1</strong> megemlítette <strong>%2</strong>-t itt: <strong>%3</strong>",
|
|
5
5
|
"notificationType_mention": "Amikor valaki megemlít téged"
|
|
6
6
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
2
|
"mentions": "メンション",
|
|
3
|
-
"
|
|
4
|
-
"
|
|
3
|
+
"user-mentioned-you-in": "<strong>%1</strong> mentioned you in <strong>%2</strong>",
|
|
4
|
+
"user-mentioned-group-in": "<strong>%1</strong> mentioned <strong>%2</strong> in <strong>%3</strong>"
|
|
5
5
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
"
|
|
2
|
+
"user-mentioned-you-in": "la .<strong>%1</strong>. klacpe do la .<strong>%2</strong>.",
|
|
3
|
+
"user-mentioned-group-in": "la .<strong>%1</strong>. klacpe la .<strong>%2</strong>. la .<strong>%3</strong>."
|
|
4
4
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"mentions": "Omtaler",
|
|
3
|
-
"
|
|
4
|
-
"
|
|
3
|
+
"user-mentioned-you-in": "<strong>%1</strong> nevnte deg i <strong>%2</strong>",
|
|
4
|
+
"user-mentioned-group-in": "<strong>%1</strong> nevnte <strong>%2</strong> i <strong>%3</strong>",
|
|
5
5
|
"notificationType_mention": "Når noen nevner deg"
|
|
6
6
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"mentions": "Wspomnienia",
|
|
3
|
-
"
|
|
4
|
-
"
|
|
3
|
+
"user-mentioned-you-in": "<strong>%1</strong> wspomniał o Tobie w <strong>%2</strong>",
|
|
4
|
+
"user-mentioned-group-in": "<strong>%1</strong> wspomniał <strong>%2</strong> w <strong>%3</strong>",
|
|
5
5
|
"notificationType_mention": "Kiedy ktoś o Tobie wspomni"
|
|
6
6
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"mentions": "Menções",
|
|
3
|
-
"
|
|
4
|
-
"
|
|
3
|
+
"user-mentioned-you-in": "<strong>%1</strong> mencionou-te no tópico <strong>%2</strong>",
|
|
4
|
+
"user-mentioned-group-in": "<strong>%1</strong> mencionou o grupo <strong>%2</strong> no tópico <strong>%3</strong>",
|
|
5
5
|
"notificationType_mention": "Quando alguém te menciona"
|
|
6
6
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"mentions": "Упоминания",
|
|
3
|
-
"
|
|
4
|
-
"
|
|
3
|
+
"user-mentioned-you-in": "<strong>%1</strong> упомянул Вас в <strong>%2</strong>",
|
|
4
|
+
"user-mentioned-group-in": "<strong>%1</strong> упомянул <strong>%2</strong> в <strong>%3</strong>",
|
|
5
5
|
"notificationType_mention": "Когда кто-то вас упомянул"
|
|
6
6
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"mentions": "Bahsedilmeler",
|
|
3
|
-
"
|
|
4
|
-
"
|
|
3
|
+
"user-mentioned-you-in": "<strong>%1</strong> sizden şu konuda bahsetti: <strong>%2</strong>",
|
|
4
|
+
"user-mentioned-group-in": "<strong>%1</strong> kullanıcısı <strong>%2</strong> grubundan şu konuda bahsetti: <strong>%3</strong>",
|
|
5
5
|
"notificationType_mention": "Biri sizden bahsettiğinde"
|
|
6
6
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"mentions": "提到",
|
|
3
|
-
"
|
|
4
|
-
"
|
|
3
|
+
"user-mentioned-you-in": "<strong>%1</strong> 在 <strong>%2</strong> 中提到了你",
|
|
4
|
+
"user-mentioned-group-in": "<strong>%1</strong> 在 <strong>%3</strong> 中提到了 <strong>%2</strong>",
|
|
5
5
|
"notificationType_mention": "当有人提到你时"
|
|
6
6
|
}
|
package/library.js
CHANGED
|
@@ -136,7 +136,7 @@ Mentions.notify = async function (data) {
|
|
|
136
136
|
|
|
137
137
|
const filteredUids = await filterUidsAlreadyMentioned(uids, postData.pid);
|
|
138
138
|
if (filteredUids.length) {
|
|
139
|
-
await sendNotificationToUids(postData, filteredUids, 'user', `[[notifications:
|
|
139
|
+
await sendNotificationToUids(postData, filteredUids, 'user', `[[notifications:user-mentioned-you-in, ${displayname}, ${titleEscaped}]]`);
|
|
140
140
|
await db.setAdd(`mentions:pid:${postData.pid}:uids`, filteredUids);
|
|
141
141
|
}
|
|
142
142
|
|
|
@@ -146,7 +146,7 @@ Mentions.notify = async function (data) {
|
|
|
146
146
|
const groupName = groupsToNotify[i].name;
|
|
147
147
|
const groupMentionSent = await db.isSetMember(`mentions:pid:${postData.pid}:groups`, groupName);
|
|
148
148
|
if (!groupMentionSent && memberUids.length) {
|
|
149
|
-
await sendNotificationToUids(postData, memberUids, groupName, `[[notifications:
|
|
149
|
+
await sendNotificationToUids(postData, memberUids, groupName, `[[notifications:user-mentioned-group-in, ${displayname} , ${groupName}, ${titleEscaped}]]`);
|
|
150
150
|
await db.setAdd(`mentions:pid:${postData.pid}:groups`, groupName);
|
|
151
151
|
}
|
|
152
152
|
}
|
|
@@ -171,8 +171,9 @@ Mentions.notifyMessage = async (hookData) => {
|
|
|
171
171
|
}
|
|
172
172
|
const io = require.main.require('./src/socket.io');
|
|
173
173
|
|
|
174
|
-
const [onlineUidsInRoom, isUserInRoom, notifSettings, checks] = await Promise.all([
|
|
174
|
+
const [onlineUidsInRoom, fromUser, isUserInRoom, notifSettings, checks] = await Promise.all([
|
|
175
175
|
io.getUidsInRoom(`chat_room_${roomId}`),
|
|
176
|
+
User.getUserFields(message.fromuid, ['username']),
|
|
176
177
|
Messaging.isUsersInRoom(matchedUids, roomId),
|
|
177
178
|
Messaging.getUidsNotificationSetting(matchedUids, roomId),
|
|
178
179
|
Promise.all(matchedUids.map(
|
|
@@ -190,9 +191,10 @@ Mentions.notifyMessage = async (hookData) => {
|
|
|
190
191
|
return;
|
|
191
192
|
}
|
|
192
193
|
const roomName = validator.escape(String(roomData.roomName || `Room ${roomId}`));
|
|
194
|
+
const icon = Messaging.getRoomIcon(roomData);
|
|
193
195
|
const notifObj = await Notifications.create({
|
|
194
196
|
type: 'mention',
|
|
195
|
-
bodyShort: `[[notifications:
|
|
197
|
+
bodyShort: `[[notifications:user-mentioned-you-in-room, ${fromUser.displayname}, ${icon}, ${roomName}]]`,
|
|
196
198
|
bodyLong: message.content,
|
|
197
199
|
nid: `chat_${roomId}_${message.fromuid}_${message.messageId}`,
|
|
198
200
|
mid: message.messageId,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nodebb-plugin-mentions",
|
|
3
|
-
"version": "4.3.
|
|
3
|
+
"version": "4.3.6",
|
|
4
4
|
"description": "NodeBB Plugin that allows users to mention other users by prepending an '@' sign to their username",
|
|
5
5
|
"main": "library.js",
|
|
6
6
|
"scripts": {
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"mocha": "10.2.0",
|
|
35
|
-
"eslint": "8.
|
|
35
|
+
"eslint": "8.50.0",
|
|
36
36
|
"eslint-config-nodebb": "0.2.1",
|
|
37
|
-
"eslint-plugin-import": "2.
|
|
37
|
+
"eslint-plugin-import": "2.28.1"
|
|
38
38
|
}
|
|
39
39
|
}
|