|
@@ -90,12 +90,17 @@ https://www.instagram.com/p/B6GHRSmgV-7/`);
|
|
|
};
|
|
|
const newSub = (userName: string) => {
|
|
|
const link = linkBuilder(matched);
|
|
|
- subscribeTo(link, {id: Number(userName.split(':')[1])});
|
|
|
+ let msg: string;
|
|
|
+ if (offset !== '0') {
|
|
|
+ msg = `已为此聊天订阅 ${link} 并回溯到 ${args[0].replace(/\?.*/, '')}(含)之后的第一条动态`;
|
|
|
+ }
|
|
|
+ return subscribeTo(link, {id: Number(userName.split(':')[1]), msg});
|
|
|
};
|
|
|
if (matched.postUrlSegment) {
|
|
|
offset = BigNumOps.plus(urlSegmentToId(matched.postUrlSegment), '-1');
|
|
|
- delete matched.postUrlSegment;
|
|
|
getPostOwner(matched.postUrlSegment).then(userName => {
|
|
|
+ delete matched.postUrlSegment;
|
|
|
+ matched.userName = userName.split(':')[0];
|
|
|
if (!tryFindSub(userName)) newSub(userName);
|
|
|
}).catch((parsedErr: Error) => {
|
|
|
reply(parsedErr.message);
|