Skip to content

Commit

Permalink
chore(): reenable notifications
Browse files Browse the repository at this point in the history
  • Loading branch information
kenshyx committed Jun 3, 2022
1 parent 074e3c8 commit e5a5da1
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 15 deletions.
21 changes: 12 additions & 9 deletions api/hub/src/datasources/follower.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,18 @@ class FollowerAPI extends DataSource {
await queryCache.set(followingKey, [following]);
}

// @Todo: turn back on after migration
// const notification = {
// property: 'NEW_FOLLOWER',
// provider: 'awf.graphql.profile.api',
// value: {
// follower: pubKey,
// },
// };
//await sendNotification(following, notification);
// if a new record was created
if (!followRecord) {
const notification = {
property: 'NEW_FOLLOWER',
provider: 'awf.graphql.profile.api',
value: {
follower: pubKey,
},
};
await sendNotification(following, notification);
}

return true;
}

Expand Down
3 changes: 2 additions & 1 deletion api/hub/src/notifications.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@ const getMailSender = async () => {
}
return Promise.resolve(mailSender);
}
const host = process.env.API || undefined;
const api = Users.withUserAuth(
await createUserAuth(process.env.USER_GROUP_API_KEY, process.env.USER_GROUP_API_SECRET),
{ debug: process.env.NODE_ENV !== 'production' },
{ debug: process.env.NODE_ENV !== 'production', host: host },
);
const mailSenderID = mailSenderIdentity();
await api.getToken(mailSenderID);
Expand Down
8 changes: 4 additions & 4 deletions build/integrations_bucket.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
{
"name": "@akashaorg/app-moderation-ewa",
"id": "0xb5353ae20a4ece1b430333820c5303ff86b3ef3b9662aa8c46f3c74adccf3c44",
"ipfsManifest": "f0155171c44aa4cb3adb7255b4d667a8c988658bd938f861a63027d1e9c59b4b1",
"ipfsManifest": "f0155171c134437c04ab7215d0e42a012432109ae2b2de3ad216f3ec3db38b29e",
"type": 0
},
{
Expand All @@ -44,7 +44,7 @@
{
"name": "@akashaorg/app-notifications",
"id": "0xa97de836ff423f85cd82a60e3dd78b3213d6254e23e2a71a53c933df9527882d",
"ipfsManifest": "f0155171c89552e1c6d8bac6d4bac45a8346cfc96701715246c068551d6a3c085",
"ipfsManifest": "f0155171c5cab5e532fc7496951971a92fddfb08339030f721b95c49bdd91e7a4",
"type": 0
},
{
Expand All @@ -68,13 +68,13 @@
{
"name": "@akashaorg/app-translation",
"id": "0x694ff1a407cb48aaf43ace2eb570ef17d0403182870f99a617b74cb36af4e366",
"ipfsManifest": "f0155171ca9c9236598c845c9d1358cdeb06a6f523903702578b777e79383c0be",
"ipfsManifest": "f0155171c5d73ed24af155572579085c9bb6cc48425c278042fb5aaf269a12972",
"type": 0
},
{
"name": "@akashaorg/app-routing",
"id": "0xc7dbd964618fa46a51ec3633a23d10c77b458d218ba061755ca7452f627d6504",
"ipfsManifest": "f0155171c5b69f1e99a6ee2727eeb0661327106475142b122cfeb2c4099e8338b",
"ipfsManifest": "f0155171cef114201695113f43cce4b8882c12cef372a0693cf8decf289503e05",
"type": 0
},
{
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
"engines": {
"node": ">=16.13.0",
"npm": ">=8.1.0",
"yarn": "<=1.22.18"
"yarn": "^1.22.0"
},
"husky": {
"hooks": {
Expand Down

0 comments on commit e5a5da1

Please sign in to comment.