@arkstack/notifications 0.16.9 → 0.16.10
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/dist/index.js +2 -2
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -447,7 +447,7 @@ var RealtimeNotification = class extends NotificationContract {
|
|
|
447
447
|
* @returns
|
|
448
448
|
*/
|
|
449
449
|
recipient(recipient) {
|
|
450
|
-
if (typeof recipient === "object" && !Array.isArray(recipient) &&
|
|
450
|
+
if (typeof recipient === "object" && !Array.isArray(recipient) && typeof recipient.id !== "undefined") {
|
|
451
451
|
this.user = recipient;
|
|
452
452
|
return this;
|
|
453
453
|
}
|
|
@@ -662,7 +662,7 @@ var Notification = class Notification {
|
|
|
662
662
|
}
|
|
663
663
|
prepare(recipient, data = {}) {
|
|
664
664
|
this.driver.data(data);
|
|
665
|
-
if (recipient && typeof recipient === "object" && !Array.isArray(recipient) &&
|
|
665
|
+
if (recipient && typeof recipient === "object" && !Array.isArray(recipient) && typeof recipient.id !== "undefined") {
|
|
666
666
|
if (this.driver instanceof MailNotification) {
|
|
667
667
|
if (recipient.email) this.driver.recipient(recipient.email);
|
|
668
668
|
} else if (this.driver instanceof SmsNotification) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arkstack/notifications",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.10",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Framework-agnostic notification module for Arkstack and Nodejs, providing support for multi-channel notification delivery.",
|
|
6
6
|
"homepage": "https://arkstack.toneflix.net/guide/notifications",
|
|
@@ -34,14 +34,14 @@
|
|
|
34
34
|
"africastalking": "^0.8.0",
|
|
35
35
|
"nodemailer": "^8.0.7",
|
|
36
36
|
"twilio": "^6.0.0",
|
|
37
|
-
"@arkstack/common": "^0.16.
|
|
37
|
+
"@arkstack/common": "^0.16.10"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
40
|
"@kanun-hq/plugin-phone": "^0.1.8",
|
|
41
41
|
"firebase-admin": "^13.0.0",
|
|
42
42
|
"pusher": "^5.2.0",
|
|
43
|
-
"@arkstack/contract": "^0.16.
|
|
44
|
-
"@arkstack/database": "^0.16.
|
|
43
|
+
"@arkstack/contract": "^0.16.10",
|
|
44
|
+
"@arkstack/database": "^0.16.10"
|
|
45
45
|
},
|
|
46
46
|
"peerDependenciesMeta": {
|
|
47
47
|
"pusher": {
|