(userId: string, config: Partial<UserConfig>)
| 444 | this.db.data.users[userId] = { |
| 445 | target: "me", |
| 446 | showSource: false |
| 447 | }; |
| 448 | } |
| 449 | Object.assign(this.db.data.users[userId], config); |
| 450 | await this.db.write(); |
| 451 | } |
| 452 | |
| 453 | // 生成消息跳转链接 |
| 454 | private generateMessageLink(chatId: string, messageId: number): string { |
| 455 | // 处理私有频道的chatId转换 |
| 456 | let linkChatId = chatId; |
| 457 | |
| 458 | // 如果chatId是数字字符串(可能为负数) |
| 459 | if (/^-?\d+$/.test(chatId)) { |
no test coverage detected