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

Remove/update calls to retired method names (closes #87, closes #78) #90

Merged
merged 1 commit into from Nov 26, 2018

Conversation

@jwflory
Copy link
Member

commented Nov 24, 2018

After #80, a few unused method calls were lying around. For the ones where a clear rename existed, I updated the method name. For the one part where I could not, I removed it.

I manually validated that the bot successfully started and ran. I also verified Imgur image upload is working.

@jwflory jwflory added the bug label Nov 24, 2018

@jwflory jwflory added this to the v1.2.2 milestone Nov 24, 2018

@jwflory jwflory self-assigned this Nov 24, 2018

@jwflory jwflory requested review from xforever1313, thenaterhood and RITlug/teleirc-developers-commit-access Nov 24, 2018

@jwflory

This comment has been minimized.

Copy link
Member Author

commented Nov 24, 2018

Also, I'm a little intrigued how something like this was overlooked by Travis in the CI run. Might be a separate issue to dig into.

@jwflory jwflory force-pushed the fix/undeclared-var-87 branch from fcd89fa to 7a2ce2b Nov 24, 2018

@jwflory jwflory changed the title Remove/update calls to retired method names (closes #87) Remove/update calls to retired method names (closes #87, closes #78) Nov 24, 2018

@jwflory jwflory force-pushed the fix/undeclared-var-87 branch from 7a2ce2b to 158d718 Nov 24, 2018

lib/TeleIrc.js Show resolved Hide resolved
lib/TeleIrc.js Show resolved Hide resolved

@jwflory jwflory force-pushed the fix/undeclared-var-87 branch 2 times, most recently from f45c4c5 to 70aa77d Nov 25, 2018

@jwflory jwflory force-pushed the fix/undeclared-var-87 branch from 17c2837 to c34cfdb Nov 26, 2018

@jwflory

This comment has been minimized.

Copy link
Member Author

commented Nov 26, 2018

@xforever1313 @Tjzabel @thenaterhood @robbyoconnor Do we want to merge this one for now and then focus in on solving #93?

@Tjzabel

This comment has been minimized.

Copy link
Member

commented Nov 26, 2018

@jwflory instead of entirely deleting the Imgur lines, could you just comment them out for now? That way we can decide when we go through this issue whether or not to keep that in.

@Tjzabel
Copy link
Member

left a comment

@jwflory looks good! These changes are simple enough.

After going through the comment chain for Imgur, I ended up creating an issue for it to give it a separate location for discussion. Since the current imgur code you are deleting in this commit is currently not used for anything at all, I feel it is fine to remove. Commenting out would be preferred while we work on the issue after this is merged, but since it exists in version control, and isn't being used, this isn't much of an issue.

@Tjzabel Tjzabel merged commit 56ec44c into master Nov 26, 2018

3 checks passed

codeclimate All good!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@Tjzabel Tjzabel deleted the fix/undeclared-var-87 branch Nov 26, 2018

Sadin added a commit to Sadin/teleirc that referenced this pull request Nov 28, 2018
Update fork (#2)
* Fix Dockerfile

* Only build CI against supported versions

* Resolve merge conflict

* Implement Sphinx documentation for Teleirc

* Update version number, expand authors, set node dependency

* Add CodeClimate support

* Remove MetaBrainz, add Pure Data (closes RITlug#54)

* Improve organization of project working directory

* Added CityZen app details

Added it first because i assumed the projects are added alphabetically.

* Add Hamara Linux Project

* Fix docker images

- Since dotenv is used, remove the gitignore and version the whole config.js file
- Fixes RITlug#60 -- add python and build-base to the alpine image
- Lower the UID by one to not conflict with nogroup in the alpine image
- Nuke the slim image as it adds very little benefit.
- Update docs accordingly
- Update yarn lock file
- Update docs to have users install yarn

* Update broken documentation link

* Add note to the installation docs that Telegram channels are not supported (RITlug#70)

* Fix link rot

* Nickserv identify (RITlug#65)

* NickServ identification + tests

* Ignoring direct messages + messages sent to other channels that the configured one

* NickServ identification will not happen when NickservService is empty in configuration
Also changes length comparison from "!=" to ">".

* Review findings addressed.

* Added bot nick to IDENTIFY message
* Added attempt to rejoin after a message from NickServ if not joined already (not tested yet)

* Crash on Telegram bot errors

* IRC Handler Refactor (RITlug#72)

* Added (untested) IrcHandlers.  These are so our IRC response logic is in separate classes, not in all one function.

The idea is maybe we can eventually make our IRC responses more advanced or configurable, and that is more easily doable through classes.

* Added Requires and and exports.

Added unit test for ErrorHandler.

* Added unit tests for the action handler.

* Added Kick and Join handler unit tests.

* Added unit tests for MessageHandler and PartHandler.

* Bind *all* the things (...thanks node...).

* Rename IrcHandlers so they have "Irc" in front of their names, so there is no mistake.

* Renamed classes so they have "IRC" in front so they are not confused with Telegram.

* Remove nodeunit... added it by accident.

* Added new lines at the end of the handler files.

* capital H... this is what I get for doing this on Windows...

* Added a helper function "StringExistsIgnoreCase".

This function is used to check for black-listed usernames, but can be used for other things as well.

* === instead of ==.

* Changed wording on joining a channel.

* ReportMessage -> RelayMessage

* Added (untested) IrcHandlers.  These are so our IRC response logic is in separate classes, not in all one function.

The idea is maybe we can eventually make our IRC responses more advanced or configurable, and that is more easily doable through classes.

* Added Requires and and exports.

Added unit test for ErrorHandler.

* Added unit tests for the action handler.

* Added Kick and Join handler unit tests.

* Added unit tests for MessageHandler and PartHandler.

* Bind *all* the things (...thanks node...).

* Rename IrcHandlers so they have "Irc" in front of their names, so there is no mistake.

* Renamed classes so they have "IRC" in front so they are not confused with Telegram.

* Remove nodeunit... added it by accident.

* Added new lines at the end of the handler files.

* capital H... this is what I get for doing this on Windows...

* Added a helper function "StringExistsIgnoreCase".

This function is used to check for black-listed usernames, but can be used for other things as well.

* === instead of ==.

* Changed wording on joining a channel.

* ReportMessage -> RelayMessage

* Integrated IrcNickServHandler into TeleIrc.js

Updated various unit tests so they work with it.

* Almost there... need to figure out this mock in IrcConnectionTest... it does not mock the IRC bot properly.

* Got the unit tests passing again.  This was done by having the mock IRC bot to take in multiple actions per listener, instead of just one.

Fixed an issue with the IrcMessageHandler, where it would forward messages that did not contain a channel.

* Added undefined check to nickservIdentify().

* Added comment to the 'status' function.

* Add Fedora CommOps, Diversity, Marketing as users (closes RITlug#75)

* Fix typo in hyperlink, missed from RITlug#79

* Gitignore change (RITlug#82)

* Allow new files in lib to be added via git.

At the moment, they were ignored since .gitignore was ignoring lib
because of the python virtual environment.

* Needed to put a slash in front...

* Wording.

* Just trying it out (RITlug#84)

* Check if we can actually reach Telegram on start (RITlug#83)

* Check if we can actually reach Telegram on start

* Fix tests

* Fix comment indentation

* No need for intermediate variable

* Telegram Refactor (RITlug#80)

* Added (untested) IrcHandlers.  These are so our IRC response logic is in separate classes, not in all one function.

The idea is maybe we can eventually make our IRC responses more advanced or configurable, and that is more easily doable through classes.

* Added Requires and and exports.

Added unit test for ErrorHandler.

* Added unit tests for the action handler.

* Added Kick and Join handler unit tests.

* Added unit tests for MessageHandler and PartHandler.

* Bind *all* the things (...thanks node...).

* Rename IrcHandlers so they have "Irc" in front of their names, so there is no mistake.

* Renamed classes so they have "IRC" in front so they are not confused with Telegram.

* Remove nodeunit... added it by accident.

* Added new lines at the end of the handler files.

* capital H... this is what I get for doing this on Windows...

* Added a helper function "StringExistsIgnoreCase".

This function is used to check for black-listed usernames, but can be used for other things as well.

* === instead of ==.

* Changed wording on joining a channel.

* ReportMessage -> RelayMessage

* Added (untested) IrcHandlers.  These are so our IRC response logic is in separate classes, not in all one function.

The idea is maybe we can eventually make our IRC responses more advanced or configurable, and that is more easily doable through classes.

* Added Requires and and exports.

Added unit test for ErrorHandler.

* Added unit tests for the action handler.

* Added Kick and Join handler unit tests.

* Added unit tests for MessageHandler and PartHandler.

* Bind *all* the things (...thanks node...).

* Rename IrcHandlers so they have "Irc" in front of their names, so there is no mistake.

* Renamed classes so they have "IRC" in front so they are not confused with Telegram.

* Remove nodeunit... added it by accident.

* Added new lines at the end of the handler files.

* capital H... this is what I get for doing this on Windows...

* Added a helper function "StringExistsIgnoreCase".

This function is used to check for black-listed usernames, but can be used for other things as well.

* === instead of ==.

* Changed wording on joining a channel.

* ReportMessage -> RelayMessage

* Integrated IrcNickServHandler into TeleIrc.js

Updated various unit tests so they work with it.

* Almost there... need to figure out this mock in IrcConnectionTest... it does not mock the IRC bot properly.

* Got the unit tests passing again.  This was done by having the mock IRC bot to take in multiple actions per listener, instead of just one.

Fixed an issue with the IrcMessageHandler, where it would forward messages that did not contain a channel.

* Added undefined check to nickservIdentify().

* Added comment to the 'status' function.

* Began to add Telegram classes.

* Added (completely untested) ErrorHandler, PhotoHandler, and StickerHandler for Telegram.

* Plugged in the TgEventListener and the handlers to TeleIrc.js.

Again, completely untested.

* Got unit tests passing again.

* Added TgDocumentHandler unit tests.

* Added TG Part/Join Handler unit tests.

* Added TG Message handler tests.

* new lines at end of files.

* Added unit tests for the sticker handler.

* Added photo handler unit tests.

* Got the Telegram refactor working when running via node.

#Success!

Now just to review and put in a pull.

* Put the chatId to be a string not an int.

* Rename CleanUpUserName -> ResolveUserName

* Never added TgImgurPhotoHandler.js

* Renamed "Report" functions to "Relay" Functions, per review.

* Use falseyness for the TG Handlers, per code review.

* Update yarn dependency tree

* Reorganize gitignore / add Dockerfile as ignored file

* Fix Fedora container, validate on Fedora 29 (closes RITlug#86)

This one wasn't too complicated, but took some playing around. What
changed here:

* Fix statements using old paths for files that no longer exist there
* Don't uninstall make, since it uninstalls nodejs
* yarn emits an error code, even if it actually was successful;
  therefore, run the next command regardless if it fails (this is why we
  can't have nice things :P)

* Set NTBA_FIX_319=1 in env.example (closes RITlug#88)

This resolves a deprecation warning given by node-telegram-bot-api about
the "automatic enabling of cancellation of promises". Given context from
the issue linked in the upstream project, setting this environment
variable will ensure backwards-compatibility with future releases. If we
need this feature, then we need to enable it when we need it.

Ref:

    yagop/node-telegram-bot-api#319 (comment)

* Fix CI tests: updated env.example path

* Use pipenv for docs development environment (RITlug#92)

Check it out:

  https://pipenv.readthedocs.io/

* Remove/update calls to retired method names (closes RITlug#87, closes RITlug#78) (RITlug#90)

* Remove redundant COPY statement from Fedora Dockerfile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.