nodebb-plugin-simple-contact 2.1.6 → 2.2.0
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
|
@@ -147,6 +147,13 @@ async function handleContactSubmission(req, res) {
|
|
|
147
147
|
return res.status(400).json({ error: 'נא למלא את כל שדות החובה.' });
|
|
148
148
|
}
|
|
149
149
|
|
|
150
|
+
if (data.username) {
|
|
151
|
+
const exists = await user.getUidByUsername(data.username);
|
|
152
|
+
if (!exists) {
|
|
153
|
+
return res.status(400).json({ error: 'לא נמצא משתמש בשם זה. אנא כתבו שם נכון או השאירו ריק' });
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
150
157
|
const contactId = Date.now();
|
|
151
158
|
const key = 'contact-request:' + contactId;
|
|
152
159
|
const senderUid = req.uid || 0;
|
package/package.json
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
<div dir="rtl" style="font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; direction: rtl; text-align: right; background-color: #f9f9f9; padding: 20px;">
|
|
2
2
|
|
|
3
3
|
<div style="text-align: center; margin-bottom: 30px;">
|
|
4
|
-
|
|
4
|
+
{{{ if brand:emailLogo }}}
|
|
5
|
+
<img src="{url}{brand:emailLogo}" alt="{site_title}" style="max-height: 60px; border: 0;">
|
|
6
|
+
{{{ else }}}
|
|
7
|
+
<img src="{url}{brand:logo}" alt="{site_title}" style="max-height: 60px; border: 0;">
|
|
8
|
+
{{{ end }}}
|
|
5
9
|
<h1 style="color: #333;">{site_title}</h1>
|
|
6
10
|
</div>
|
|
7
11
|
|