@heyamiko/amiko-cli 0.12.0-beta.7 → 0.12.0-beta.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +5 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -28958,6 +28958,10 @@ function detectMime(buffer, name) {
|
|
|
28958
28958
|
|
|
28959
28959
|
// src/commands/chat.ts
|
|
28960
28960
|
var UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
28961
|
+
var CUID_RE = /^c[a-z0-9]{20,}$/i;
|
|
28962
|
+
function looksLikeConversationId(t) {
|
|
28963
|
+
return UUID_RE.test(t) || CUID_RE.test(t);
|
|
28964
|
+
}
|
|
28961
28965
|
function authOrExit() {
|
|
28962
28966
|
try {
|
|
28963
28967
|
return requireAuth();
|
|
@@ -28989,7 +28993,7 @@ async function findOrCreateDm(auth, userId) {
|
|
|
28989
28993
|
}
|
|
28990
28994
|
async function resolveConversation(auth, target) {
|
|
28991
28995
|
const t = target.trim();
|
|
28992
|
-
if (
|
|
28996
|
+
if (looksLikeConversationId(t))
|
|
28993
28997
|
return t;
|
|
28994
28998
|
if (t.startsWith("@")) {
|
|
28995
28999
|
const handle = t.slice(1);
|