-
Notifications
You must be signed in to change notification settings - Fork 9
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
Conversation
… debug stuff moved to bus.js
There was a problem hiding this 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]; | ||
}); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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; | ||
} | ||
} |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok.
There was a problem hiding this 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.
Thanks for your contribution, everything is okay. I'm merging that. |
No description provided.