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

Added emoji from stickers implementation #40

Merged
merged 6 commits into from Oct 23, 2017
Merged

Added emoji from stickers implementation #40

merged 6 commits into from Oct 23, 2017

Conversation

ghost
Copy link

@ghost ghost commented Oct 20, 2017

No description provided.

@ghost ghost mentioned this pull request Oct 21, 2017
@ForNeVeR ForNeVeR self-requested a review October 21, 2017 10:46
Copy link
Collaborator

@ForNeVeR ForNeVeR left a comment

Choose a reason for hiding this comment

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

Overall that looks good, but I still need to test it. Let's make the requested changes (feel free to argue although), after that I'll conduct some manual test and I'm okay with merge.

const telegram = global.telegram = require('./bots/telegram');
Object.keys(bots).forEach(k => {
global[k] = bots[k];
});
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we really need to store bots in global variables? I can't see where are they used.

Copy link
Author

Choose a reason for hiding this comment

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

Already discussed and deleted those globals

@@ -0,0 +1,2 @@
const xmpp = Symbol.for('XMPP');
module.exports = xmpp;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Just an idea: let's place all the networks in a single file? I can't see a reason to keep a bunch of files 2 lines long.

Copy link
Author

Choose a reason for hiding this comment

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

The idea was that outside world doesn't need to know anything about the kind of network, this is needed just to skip double handling of messages sent through bus.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Eh, okay then.


return msg.first_name;
}
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Honestly that looks strange. I can't see why you need a class for that single static function.

Copy link
Author

Choose a reason for hiding this comment

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

This is done this way for having common interface for all *Message classes, code with similar logic is static and named as test is a part of other messages types. These kinds of methods are for checking if Telegram message could be transformed to our class, we can rename them all or re-structure as non-statics or whatever but in such case this change should be applied to all methods of this kind

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ok.

@ForNeVeR ForNeVeR assigned ghost Oct 21, 2017
@ForNeVeR ForNeVeR assigned ForNeVeR and unassigned ghost Oct 23, 2017
Copy link
Collaborator

@ForNeVeR ForNeVeR left a comment

Choose a reason for hiding this comment

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

Review is okay, now I'll perform tests.

@ForNeVeR
Copy link
Collaborator

Thanks for your contribution, everything is okay. I'm merging that.

@ForNeVeR ForNeVeR merged commit 96a638f into jt3k:master Oct 23, 2017
ForNeVeR added a commit that referenced this pull request Oct 23, 2017
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.

None yet

1 participant