Option to post to channels/users for RocketChat#93
Open
soundstorm wants to merge 3 commits intofraschetti:masterfrom
Open
Option to post to channels/users for RocketChat#93soundstorm wants to merge 3 commits intofraschetti:masterfrom
soundstorm wants to merge 3 commits intofraschetti:masterfrom
Conversation
By using `#channel` or `@user` in channel list it's possible to post to channels or (only *already contacted*) users. Limited to first 50 visible channels, as paging does not work with `RocketChatAPI`. Somehow posting images to RC does not work.
Author
|
But maybe a PR at |
Otherwise would raise a NameError instead of the defined Exception
GitHub Web on mobile is awful
Author
|
Okay, posting of images was my fault, as the We may wait for Pipoline/rocket-python#49 as the code would be much better then: rc_room_id = None
if channel[0] == "#":
rc_room_id = rc.get_public_room_id(channel[1:])
elif channel[0] == "@":
rc_self = rc.get_my_info()
# generate room id by concatenating the user ids
rc_room_id = rc.get_user_id(channel[1:]) + rc_self['_id']
else: # backwards compatibility with no # or @ to post to groups
rc_room_id = rc.get_room_id(channel) #groups |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
By using
#channelor@userin channel list it's possible to post to channels or (only already contacted) users.Limited to first 50 visible channels, as paging does not work with
RocketChatAPI.Somehow posting images to RC does not work.
Closes #92