Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/dbilokha/viber #98

Merged
merged 15 commits into from
May 7, 2020
Merged

Feature/dbilokha/viber #98

merged 15 commits into from
May 7, 2020

Conversation

danemesis
Copy link
Owner

No description provided.

@danemesis danemesis requested a review from Proladge May 3, 2020 17:50
@danemesis danemesis marked this pull request as draft May 3, 2020 17:50
Copy link
Collaborator

@Proladge Proladge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Viber 🚀
My granny will be so happy!!!

CONTAINER_VERSION: process.env.CONTAINER_VERSION,
LOGGLY_TOKEN: process.env.LOGGLY_TOKEN,
LOGGLY_SUBDOMAIN: process.env.LOGGLY_SUBDOMAIN ?? 'covid19liveupd',
LOGGLY_TAGS: tags,
APP_URL: process.env.APP_URL ?? '',
NGROK_URL: process.env.APP_URL ?? '',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@danbilokha Do we stop using NGROK?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean for local development

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nope, but I think it is misleading property since it has to be APP_URL

import { Express } from 'express';
import * as Viber from 'viber-bot';

export async function runViberBot(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

API Looks super similar to telegram.
That's cool

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's true. There are a lot things to improve, honestly. SOOOO MUCH TO MOVE TO ABSTRACT

);
}

checkCovid19Updates();
// tslint:disable-next-line:no-console
console.log(`${CONSOLE_LOG_DELIMITER}Starting Telegram bot`);
runTelegramBot(app, appUrl, environments.TELEGRAM_TOKEN);

// tslint:disable-next-line:no-console
console.log(`${CONSOLE_LOG_DELIMITER}Starting Viber bot`);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@danbilokha Do you mind adding feature flag here?

I'm not sure if it's really needed. But I'd like to have one, since it looks like we are going to launch. Our bot responder withing single app.

What is your opinion about that?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't get it

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Та забей....

@danemesis danemesis marked this pull request as ready for review May 7, 2020 09:48
@danemesis danemesis requested a review from Proladge May 7, 2020 09:48
Copy link
Collaborator

@Proladge Proladge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My granny will be so happy to see it in viber finally.
God bless you @danbilokha

import { unsubscribeStrategyResponse } from './botResponse/unsubscribeResponse';
import { trendsByCountryResponse } from './botResponse/trendResponse';
import { CountrySituationInfo } from '../../models/covid19.models';
import { catchAsyncError } from '../../utils/catchError';
import { runSendScheduledNotificationToUsersJob } from '../../services/infrastructure/scheduler';
import { telegramUserService } from './services/user';
import { withSingleParameterAfterCommand } from './services/registry/withSingleParameterAfterCommand';
import { withSingleParameterAfterCommand } from '../../services/domain/registry/withSingleParameterAfterCommand';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@danbilokha does it really belongs to domain.
I mean I'm ok with that just curious about how you see it

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's rather infrastructure, moving it there

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oop, I am not sure ...

"Enter country name by a pattern": "Enter country name by a pattern",
"[country name]": "[country name]",
"Main menu": "Main menu",
"Привіт, %s": "Привіт, %s",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Привіт, Welcome on board

@danemesis danemesis linked an issue May 7, 2020 that may be closed by this pull request
3 tasks
@danemesis danemesis merged commit 9f99fe0 into master May 7, 2020
@danemesis danemesis deleted the feature/dbilokha/viber branch May 7, 2020 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Spread to other messangers
2 participants