Fetch message buffers from mattermost-buffers
When processing a WS frame, we were matching buffers by name to insert the posts on them. This PR looks for the buffer on `mattermost-buffers` by id keyword, making it much safer
This commit is contained in:
parent
635e95107d
commit
47eb5e405f
1 changed files with 3 additions and 3 deletions
|
@ -113,9 +113,9 @@ conform to a post plist"
|
|||
"Processes a websocket posted message"
|
||||
(let* ((channel-name (plist-get (plist-get msg :data) :channel_name))
|
||||
(channel-display-name (plist-get (plist-get msg :data) :channel_display_name))
|
||||
(chanb (or (get-buffer (format "> %s <" channel-name))
|
||||
(get-buffer (format "> %s <" channel-display-name))))
|
||||
(post (mattermost--ws-posted-to-post msg)))
|
||||
(post (mattermost--ws-posted-to-post msg))
|
||||
(channel-id (plist-get post :channel_id))
|
||||
(chanb (plist-get mattermost-buffers (mattermost-string->keyword channel-id))))
|
||||
(if (not (null chanb))
|
||||
(with-current-buffer chanb
|
||||
(save-excursion
|
||||
|
|
Loading…
Reference in a new issue