|
@@ -283,20 +283,20 @@ class default_1 {
|
|
logger.debug(`pulling feed ${currentFeed}`);
|
|
logger.debug(`pulling feed ${currentFeed}`);
|
|
const promise = new Promise(resolve => {
|
|
const promise = new Promise(resolve => {
|
|
let job = Promise.resolve();
|
|
let job = Promise.resolve();
|
|
- let match = /https:\/\/twitter.com\/([^\/]+)\/lists\/([^\/]+)/.exec(currentFeed);
|
|
|
|
- let id;
|
|
|
|
|
|
+ let id = lock.threads[currentFeed].id;
|
|
let endpoint;
|
|
let endpoint;
|
|
|
|
+ let match = /https:\/\/twitter.com\/([^\/]+)\/lists\/([^\/]+)/.exec(currentFeed);
|
|
if (match) {
|
|
if (match) {
|
|
endpoint = 'listTweets';
|
|
endpoint = 'listTweets';
|
|
if (match[1] === 'i') {
|
|
if (match[1] === 'i') {
|
|
id = match[2];
|
|
id = match[2];
|
|
}
|
|
}
|
|
- else {
|
|
|
|
|
|
+ else if (id === undefined) {
|
|
job = job.then(() => this.client.v1.list({
|
|
job = job.then(() => this.client.v1.list({
|
|
owner_screen_name: match[1],
|
|
owner_screen_name: match[1],
|
|
slug: match[2],
|
|
slug: match[2],
|
|
})).then(({ id_str }) => {
|
|
})).then(({ id_str }) => {
|
|
- id = id_str;
|
|
|
|
|
|
+ lock.threads[currentFeed].id = id = id_str;
|
|
});
|
|
});
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -304,9 +304,8 @@ class default_1 {
|
|
match = /https:\/\/twitter.com\/([^\/]+)/.exec(currentFeed);
|
|
match = /https:\/\/twitter.com\/([^\/]+)/.exec(currentFeed);
|
|
if (match) {
|
|
if (match) {
|
|
endpoint = 'userTimeline';
|
|
endpoint = 'userTimeline';
|
|
- id = lock.threads[currentFeed].id;
|
|
|
|
if (id === undefined) {
|
|
if (id === undefined) {
|
|
- job = job.then(() => this.queryUser(match[1])).then(userNameId => {
|
|
|
|
|
|
+ job = job.then(() => this.queryUser(match[1].replace(/^@?(.*)$/, '$1'))).then(userNameId => {
|
|
lock.threads[currentFeed].id = id = userNameId.split(':')[1];
|
|
lock.threads[currentFeed].id = id = userNameId.split(':')[1];
|
|
});
|
|
});
|
|
}
|
|
}
|