mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 07:31:24 +00:00
chore: Enable "curly" rule to avoid single-statement if confusion/errors.
This commit is contained in:
@@ -171,8 +171,14 @@ export function isExternalHookSession(sessionKey: string): boolean {
|
||||
* Extracts the hook type from a session key.
|
||||
*/
|
||||
export function getHookType(sessionKey: string): ExternalContentSource {
|
||||
if (sessionKey.startsWith("hook:gmail:")) return "email";
|
||||
if (sessionKey.startsWith("hook:webhook:")) return "webhook";
|
||||
if (sessionKey.startsWith("hook:")) return "webhook";
|
||||
if (sessionKey.startsWith("hook:gmail:")) {
|
||||
return "email";
|
||||
}
|
||||
if (sessionKey.startsWith("hook:webhook:")) {
|
||||
return "webhook";
|
||||
}
|
||||
if (sessionKey.startsWith("hook:")) {
|
||||
return "webhook";
|
||||
}
|
||||
return "unknown";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user