From 3164ba2d982449c9362347bcc27eb9008a4b91c1 Mon Sep 17 00:00:00 2001 From: jxxghp Date: Thu, 5 Oct 2023 17:57:47 -0700 Subject: [PATCH] fix #734 --- app/plugins/webhook/__init__.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/plugins/webhook/__init__.py b/app/plugins/webhook/__init__.py index 1d20dc28..c735d54f 100644 --- a/app/plugins/webhook/__init__.py +++ b/app/plugins/webhook/__init__.py @@ -152,12 +152,12 @@ class WebHook(_PluginBase): return tuple(__to_dict(list(_event))) elif isinstance(_event, set): return set(__to_dict(list(_event))) - elif isinstance(_event, frozenset): - return frozenset(__to_dict(list(_event))) + elif hasattr(_event, 'to_dict'): + return __to_dict(_event.to_dict()) + elif hasattr(_event, '__dict__'): + return __to_dict(_event.__dict__) elif isinstance(_event, (int, float, str, bool, type(None))): return _event - elif hasattr(_event, '__dict__'): - return _event.__dict__ else: return str(_event)