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

Fixing websocket Message parsing error #867 #868

Merged
merged 2 commits into from
Mar 8, 2019
Merged

Fixing websocket Message parsing error #867 #868

merged 2 commits into from
Mar 8, 2019

Conversation

iobreaker
Copy link
Contributor

@iobreaker iobreaker commented Mar 7, 2019

Description

This fix is for issue #867 with Message Parameters order in websocket connector and for the exception raised when testing if message.text is not empty when message object is None in core.py

Fixes #867

Status

READY | UNDER DEVELOPMENT | ON HOLD

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Test fixed and added

How Has This Been Tested?

  • Manually with opsdroid-desktop (all good)

Testing Logs

INFO opsdroid.web: Started web server on http://127.0.0.1:8080
INFO aiohttp.access: 127.0.0.1 [07/Mar/2019:21:23:40 +0000] "POST /connector/websocket HTTP/1.1" 200 220 "-" "-"
DEBUG opsdroid.connector.websocket: User connected to 474c9c84-411f-11e9-a552-b8e85642f7e8
<opsdroid.connector.websocket.ConnectorWebsocket object at 0x10311b940>
DEBUG opsdroid.core: Parsing input: hi
DEBUG opsdroid.core: Processing parsers...
DEBUG opsdroid.connector.websocket: Responding with: 'Hi None' in target 474c9c84-411f-11e9-a552-b8e85642f7e8

Checklist:

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation (if applicable)
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@codecov
Copy link

codecov bot commented Mar 7, 2019

Codecov Report

Merging #868 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #868   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files          34     34           
  Lines        2187   2188    +1     
=====================================
+ Hits         2187   2188    +1
Impacted Files Coverage Δ
opsdroid/connector/websocket/__init__.py 100% <100%> (ø) ⬆️
opsdroid/core.py 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8dfa6c4...2a3ffeb. Read the comment docs.

@iobreaker
Copy link
Contributor Author

usually sending an empty message is avoided by the chat client but in case of opsdroid-desktop the empty message is sent to opsdroid. I did the modification to ignore empty message as it was before the modification (spiting test in two steps).

@jacobtomlinson
Copy link
Member

Many thanks! Don't forget to ping me your address via DM on Twitter or Gitter and I'll post you some opsdroid stickers!

@jacobtomlinson jacobtomlinson merged commit d4ac230 into opsdroid:master Mar 8, 2019
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.

Websokect connector : message.text always None exception in core.py
2 participants