Don't stop fetching backlog on error
Some servers allow fetching history from some targets but not others. Don't completely stop fetching chat history on error. The root cause was a variable shadowing in Client.fetchBatch.
This commit is contained in:
parent
1206cfae37
commit
195e4ca371
2 changed files with 5 additions and 3 deletions
|
@ -704,6 +704,7 @@ export default class Client extends EventTarget {
|
|||
fetchBatch(msg, batchType) {
|
||||
let batchName = null;
|
||||
let messages = [];
|
||||
let cmd = msg.command;
|
||||
return this.roundtrip(msg, (msg) => {
|
||||
if (batchName) {
|
||||
let batch = msg.batch;
|
||||
|
@ -729,7 +730,7 @@ export default class Client extends EventTarget {
|
|||
}
|
||||
break;
|
||||
case "FAIL":
|
||||
if (msg.params[0] === msg.command) {
|
||||
if (msg.params[0] === cmd) {
|
||||
throw msg;
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue