@nina-protocol/nina-db 0.0.59 → 0.0.60
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/utils/index.js +2 -1
- package/package.json +1 -1
- package/src/utils/index.js +2 -2
package/dist/utils/index.js
CHANGED
|
@@ -2,6 +2,7 @@ import striptags from 'striptags';
|
|
|
2
2
|
import { TwitterApi } from 'twitter-api-v2';
|
|
3
3
|
import Account from '../models/Account.js';
|
|
4
4
|
const TWEET_DELAY = 360000; // 6 minutes
|
|
5
|
+
const NINA_DOMAIN = 'https://ninaprotocol.com';
|
|
5
6
|
const removeQuotesFromStartAndEndOfString = (string) => {
|
|
6
7
|
return string.substring(1, string.length - 1).substring(-1, string.length - 1);
|
|
7
8
|
};
|
|
@@ -34,7 +35,7 @@ export const tweetNewRelease = async (metadata, publisherId, slug) => {
|
|
|
34
35
|
text = `${text} (@${twitterVerification.value})`;
|
|
35
36
|
}
|
|
36
37
|
}
|
|
37
|
-
text = `${text}
|
|
38
|
+
text = `${text} ${NINA_DOMAIN}/releases/${slug}`;
|
|
38
39
|
await client.v2.tweet(text);
|
|
39
40
|
}
|
|
40
41
|
catch (error) {
|
package/package.json
CHANGED
package/src/utils/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import { TwitterApi } from 'twitter-api-v2';
|
|
|
3
3
|
import Account from '../models/Account.js';
|
|
4
4
|
|
|
5
5
|
const TWEET_DELAY = 360000; // 6 minutes
|
|
6
|
-
|
|
6
|
+
const NINA_DOMAIN = 'https://ninaprotocol.com';
|
|
7
7
|
const removeQuotesFromStartAndEndOfString = (string) => {
|
|
8
8
|
return string.substring(1, string.length - 1).substring(-1, string.length - 1);
|
|
9
9
|
}
|
|
@@ -39,7 +39,7 @@ export const tweetNewRelease = async (metadata, publisherId, slug) => {
|
|
|
39
39
|
text = `${text} (@${twitterVerification.value})`
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
|
-
text = `${text}
|
|
42
|
+
text = `${text} ${NINA_DOMAIN}/releases/${slug}`
|
|
43
43
|
await client.v2.tweet(text);
|
|
44
44
|
} catch (error) {
|
|
45
45
|
console.warn('error sending new release tweet: ', error, metadata)
|