Open Konubinix opened 2 years ago
When someone refers to a private channel for which I don't have access, in slack, it is displayed like this.
In emacs, it fails in slack-block-to-string (for slack-rich-text-channel-element)
slack-block-to-string
In the following code
(propertize (format "#%s" (slack-room-name (slack-room-find id team) team)) 'room-id id 'keymap slack-channel-button-keymap 'face 'slack-channel-button-face)))
It cannot find the room, and then calls (slack-room-name nil team) which fails, leaving the channel partially filled.
(slack-room-name nil team)
I hackily changed the code to write "private_channel" when it does not find the channel.
(propertize (format "#%s" (if-let ( (channel (slack-room-find id team)) ) (slack-room-name channel team) "private_channel" ) ) 'room-id id 'keymap slack-channel-button-keymap 'face 'slack-channel-button-face)))
So that it now doesn't fail.
We can discuss the issue so that I can submit a pull request. So far, my code looks a bit ad-hoc.
When someone refers to a private channel for which I don't have access, in slack, it is displayed like this.
In emacs, it fails in
slack-block-to-string
(for slack-rich-text-channel-element)In the following code
It cannot find the room, and then calls
(slack-room-name nil team)
which fails, leaving the channel partially filled.I hackily changed the code to write "private_channel" when it does not find the channel.
So that it now doesn't fail.
We can discuss the issue so that I can submit a pull request. So far, my code looks a bit ad-hoc.