mirror of
https://github.com/stakwork/sphinx-relay.git
synced 2026-08-13 12:33:24 +02:00
feat: add second_brain_url when creating a tribe
This commit is contained in:
parent
205a0fa455
commit
5a7b191db1
6 changed files with 12 additions and 7 deletions
3
dist/src/controllers/chatTribes.js
vendored
3
dist/src/controllers/chatTribes.js
vendored
|
|
@ -843,7 +843,7 @@ exports.replayChatHistory = replayChatHistory;
|
|||
* @param {Object} [profile_filters] - The profile filters for the chat.
|
||||
* @returns {Promise<Object>} - An object containing the tribe chat parameters.
|
||||
*/
|
||||
function createTribeChatParams(owner, contactIds, name, img, price_per_message, price_to_join, escrow_amount, escrow_millis, unlisted, is_private, app_url, feed_url, feed_type, tenant, pin, profile_filters, call_recording, meme_server_location, jitsi_server, stakwork_api_key, stakwork_webhook) {
|
||||
function createTribeChatParams(owner, contactIds, name, img, price_per_message, price_to_join, escrow_amount, escrow_millis, unlisted, is_private, app_url, feed_url, feed_type, tenant, pin, profile_filters, call_recording, meme_server_location, jitsi_server, stakwork_api_key, stakwork_webhook, second_brain_url) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const date = new Date();
|
||||
date.setMilliseconds(0);
|
||||
|
|
@ -885,6 +885,7 @@ function createTribeChatParams(owner, contactIds, name, img, price_per_message,
|
|||
jitsiServer: jitsi_server || '',
|
||||
stakworkApiKey: stakwork_api_key || '',
|
||||
stakworkWebhook: stakwork_webhook || '',
|
||||
secondBrainUrl: second_brain_url || '',
|
||||
};
|
||||
});
|
||||
}
|
||||
|
|
|
|||
2
dist/src/controllers/chatTribes.js.map
vendored
2
dist/src/controllers/chatTribes.js.map
vendored
File diff suppressed because one or more lines are too long
4
dist/src/controllers/chats.js
vendored
4
dist/src/controllers/chats.js
vendored
|
|
@ -261,7 +261,7 @@ function createGroupChat(req, res) {
|
|||
if (!req.owner)
|
||||
return (0, res_1.failure)(res, 'no owner');
|
||||
const tenant = req.owner.id;
|
||||
const { name, is_tribe, price_per_message, price_to_join, escrow_amount, escrow_millis, img, description, tags, unlisted, app_url, feed_url, feed_type, pin, call_recording, meme_server_location, jitsi_server, stakwork_api_key, stakwork_webhook, } = req.body;
|
||||
const { name, is_tribe, price_per_message, price_to_join, escrow_amount, escrow_millis, img, description, tags, unlisted, app_url, feed_url, feed_type, pin, call_recording, meme_server_location, jitsi_server, stakwork_api_key, stakwork_webhook, second_brain_url, } = req.body;
|
||||
let { profile_filters } = req.body;
|
||||
if (profile_filters) {
|
||||
if (!Array.isArray(profile_filters)) {
|
||||
|
|
@ -300,7 +300,7 @@ function createGroupChat(req, res) {
|
|||
let chatParams;
|
||||
let okToCreate = true;
|
||||
if (is_tribe) {
|
||||
chatParams = (yield (0, chatTribes_1.createTribeChatParams)(owner, contact_ids, name, img, price_per_message, price_to_join, escrow_amount, escrow_millis, unlisted, req.body.private, app_url, feed_url, feed_type, tenant, pin, profile_filters || '', call_recording, meme_server_location, jitsi_server, stakwork_api_key, stakwork_webhook));
|
||||
chatParams = (yield (0, chatTribes_1.createTribeChatParams)(owner, contact_ids, name, img, price_per_message, price_to_join, escrow_amount, escrow_millis, unlisted, req.body.private, app_url, feed_url, feed_type, tenant, pin, profile_filters || '', call_recording, meme_server_location, jitsi_server, stakwork_api_key, stakwork_webhook, second_brain_url));
|
||||
if (chatParams.uuid) {
|
||||
// publish to tribe server
|
||||
try {
|
||||
|
|
|
|||
2
dist/src/controllers/chats.js.map
vendored
2
dist/src/controllers/chats.js.map
vendored
File diff suppressed because one or more lines are too long
|
|
@ -945,7 +945,8 @@ export async function createTribeChatParams(
|
|||
meme_server_location: string,
|
||||
jitsi_server: string,
|
||||
stakwork_api_key: string,
|
||||
stakwork_webhook: string
|
||||
stakwork_webhook: string,
|
||||
second_brain_url: string
|
||||
): Promise<{ [k: string]: any }> {
|
||||
const date = new Date()
|
||||
date.setMilliseconds(0)
|
||||
|
|
@ -988,6 +989,7 @@ export async function createTribeChatParams(
|
|||
jitsiServer: jitsi_server || '',
|
||||
stakworkApiKey: stakwork_api_key || '',
|
||||
stakworkWebhook: stakwork_webhook || '',
|
||||
secondBrainUrl: second_brain_url || '',
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -289,6 +289,7 @@ export async function createGroupChat(req: Req, res: Res): Promise<void> {
|
|||
jitsi_server,
|
||||
stakwork_api_key,
|
||||
stakwork_webhook,
|
||||
second_brain_url,
|
||||
} = req.body
|
||||
|
||||
let { profile_filters } = req.body
|
||||
|
|
@ -353,7 +354,8 @@ export async function createGroupChat(req: Req, res: Res): Promise<void> {
|
|||
meme_server_location,
|
||||
jitsi_server,
|
||||
stakwork_api_key,
|
||||
stakwork_webhook
|
||||
stakwork_webhook,
|
||||
second_brain_url
|
||||
)) as Chat
|
||||
if (chatParams.uuid) {
|
||||
// publish to tribe server
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue