@nodebb/nodebb-plugin-reactions 2.1.1 → 2.1.3

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 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));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nodebb/nodebb-plugin-reactions",
3
- "version": "2.1.1",
3
+ "version": "2.1.3",
4
4
  "nbbpm": {
5
5
  "compatibility": "^3.3.0"
6
6
  },
@@ -1,4 +1,6 @@
1
1
  .reactions {
2
+ display: flex;
3
+ gap: 1;
2
4
  .reaction {
3
5
  border: 1px solid var(--bs-primary-bg-subtle);
4
6
  display: inline-block;
@@ -6,8 +8,10 @@
6
8
  padding: 2px 4px;
7
9
  margin: 0 1px;
8
10
  cursor: pointer;
11
+ display: flex;
12
+ align-items: center;
9
13
  .emoji {
10
- height: 18px;
14
+ height: 18px!important;
11
15
  }
12
16
  &.reacted {
13
17
  border: 1px solid var(--bs-primary);