nodebb-plugin-simple-contact 2.0.1 → 2.0.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.
Files changed (2) hide show
  1. package/library.js +14 -2
  2. package/package.json +1 -1
package/library.js CHANGED
@@ -219,6 +219,7 @@ async function markAsHandled(req, res) {
219
219
  async function deleteRequest(req, res) {
220
220
  try { await db.delete('contact-request:' + req.body.id); await db.sortedSetRemove('contact-requests:sorted', req.body.id); res.json({ success: true }); } catch (err) { res.status(500).json({ error: err.message }); }
221
221
  }
222
+
222
223
  async function replyToContact(req, res) {
223
224
  const { email, subject, content, original_id } = req.body;
224
225
 
@@ -227,11 +228,22 @@ async function replyToContact(req, res) {
227
228
  }
228
229
 
229
230
  try {
231
+ const htmlContent = content.replace(/\n/g, '<br>');
232
+
230
233
  await emailer.sendToEmail('notification', email, 'he', {
231
234
  subject: subject || 'תשובה לפנייתך בצור קשר',
232
235
  username: email,
233
- message: content.replace(/\n/g, '<br>'),
234
- body: content.replace(/\n/g, '<br>')
236
+
237
+ notification: {
238
+ type: 'contact-reply',
239
+ bodyShort: subject || 'תשובה לפנייה',
240
+ bodyLong: htmlContent,
241
+ path: '/'
242
+ },
243
+
244
+ body: htmlContent,
245
+ message: htmlContent,
246
+ intro: 'קיבלת תשובה חדשה לפנייתך:'
235
247
  });
236
248
 
237
249
  if (original_id) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodebb-plugin-simple-contact",
3
- "version": "2.0.1",
3
+ "version": "2.0.2",
4
4
  "description": "תוסף טופס צור קשר עם התראות למנהלים וניהול פניות",
5
5
  "main": "library.js",
6
6
  "nbbpm": {