Regression: Edit messages after opening thread (#18375)

pull/18377/head^2
gabriellsh 6 years ago committed by GitHub
parent b8381ee765
commit 4e176dea0b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      app/threads/client/flextab/thread.js

@ -275,9 +275,15 @@ Template.thread.onCreated(async function() {
});
Template.thread.onDestroyed(function() {
const { Threads, threadsObserve, callbackRemove } = this;
const { Threads, threadsObserve, callbackRemove, state } = this;
Threads.remove({});
threadsObserve && threadsObserve.stop();
callbackRemove && callbackRemove();
const tmid = state.get('tmid');
const rid = state.get('rid');
if (rid && tmid) {
delete chatMessages[`${ rid }-${ tmid }`];
}
});

Loading…
Cancel
Save