mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 15:14:31 +00:00
feat: extend Telegram dock commands and config hashing (#929)
Thanks @grp06. Co-authored-by: George Pickett <gpickett00@gmail.com>
This commit is contained in:
@@ -58,6 +58,18 @@ function hashConfigRaw(raw: string | null): string {
|
||||
.digest("hex");
|
||||
}
|
||||
|
||||
export function resolveConfigSnapshotHash(snapshot: {
|
||||
hash?: string;
|
||||
raw?: string | null;
|
||||
}): string | null {
|
||||
if (typeof snapshot.hash === "string") {
|
||||
const trimmed = snapshot.hash.trim();
|
||||
if (trimmed) return trimmed;
|
||||
}
|
||||
if (typeof snapshot.raw !== "string") return null;
|
||||
return hashConfigRaw(snapshot.raw);
|
||||
}
|
||||
|
||||
export type ConfigIoDeps = {
|
||||
fs?: typeof fs;
|
||||
json5?: typeof JSON5;
|
||||
|
||||
Reference in New Issue
Block a user