Skip to content

Fix rtm_send_message bug#225

Merged
Roach merged 1 commit intoslackapi:masterfrom
kt5356:patch-1
Sep 29, 2017
Merged

Fix rtm_send_message bug#225
Roach merged 1 commit intoslackapi:masterfrom
kt5356:patch-1

Conversation

@kt5356
Copy link
Contributor

@kt5356 kt5356 commented Sep 18, 2017

Summary

Describe the goal of this PR. Mention any related Issue numbers.

Currently in the rtm_send_message function in client.py, if the channel is not found

channel_id = found_channel.id if found_channel.id else channel

generates the following error.

Traceback (most recent call last):
  File "/venv/lib/python3.6/site-packages/slackclient/client.py", line 160, in rtm_send_message
    channel_id = found_channel.id if found_channel.id else channel
AttributeError: 'NoneType' object has no attribute 'id'

This patch fixes the error by removing the 'id' attribute from the if statement.

Requirements (place an x in each [ ])

@CLAassistant
Copy link

CLAassistant commented Sep 18, 2017

CLA assistant check
All committers have signed the CLA.

@codecov
Copy link

codecov bot commented Sep 18, 2017

Codecov Report

Merging #225 into master will not change coverage.
The diff coverage is 0%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #225   +/-   ##
=======================================
  Coverage   59.67%   59.67%           
=======================================
  Files           9        9           
  Lines         310      310           
  Branches       57       57           
=======================================
  Hits          185      185           
  Misses        111      111           
  Partials       14       14
Impacted Files Coverage Δ
slackclient/client.py 37.5% <0%> (ø) ⬆️

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 2a9c546...fa94bbd. Read the comment docs.

@Roach Roach merged commit 13271bd into slackapi:master Sep 29, 2017
@Roach Roach mentioned this pull request Nov 22, 2017
2 tasks
c-goosen pushed a commit to c-goosen/python-slackclient that referenced this pull request Jun 18, 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.

3 participants