We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8295362 commit e7ff95bCopy full SHA for e7ff95b
1 file changed
src/api.ts
@@ -889,8 +889,9 @@ export default class AppleiMessage implements PlatformAPI {
889
}
890
891
case 'reaction-sticker': {
892
- const reactionRowID = Number.parseInt(methodName, 10)
893
- if (!Number.isFinite(reactionRowID)) throw new Error("invalid reaction sticker row ID")
+ if (!/^\d+$/.test(methodName)) throw new Error("invalid reaction sticker row ID")
+ const reactionRowID = Number(methodName)
894
+ if (!Number.isSafeInteger(reactionRowID)) throw new Error("invalid reaction sticker row ID")
895
const db = await this.ensureDB()
896
const attachment = (await db.getAttachments([reactionRowID])).find(a => a.filePath)
897
if (!attachment?.filePath) throw new Error("couldn't resolve sticker attachment for reaction row")
0 commit comments