@nodebb/nodebb-plugin-reactions 2.1.1 → 2.1.2
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/library.js +6 -0
- package/package.json +1 -1
package/library.js
CHANGED
|
@@ -73,6 +73,9 @@ ReactionsPlugin.getPostReactions = async function (data) {
|
|
|
73
73
|
|
|
74
74
|
try {
|
|
75
75
|
const settings = await meta.settings.get('reactions');
|
|
76
|
+
if (settings.enablePostReactions === 'off') {
|
|
77
|
+
return data;
|
|
78
|
+
}
|
|
76
79
|
const maximumReactions = settings.maximumReactions || DEFAULT_MAX_EMOTES;
|
|
77
80
|
|
|
78
81
|
const pids = data.posts.map(post => post && parseInt(post.pid, 10));
|
|
@@ -134,6 +137,9 @@ ReactionsPlugin.getMessageReactions = async function (data) {
|
|
|
134
137
|
|
|
135
138
|
try {
|
|
136
139
|
const settings = await meta.settings.get('reactions');
|
|
140
|
+
if (settings.enableMessageReactions === 'off') {
|
|
141
|
+
return data;
|
|
142
|
+
}
|
|
137
143
|
const maximumReactionsPerMessage = settings.maximumReactionsPerMessage || DEFAULT_MAX_EMOTES;
|
|
138
144
|
|
|
139
145
|
const mids = data.messages.map(message => message && parseInt(message.mid, 10));
|