diff --git a/ex_app/lib/all_tools/context_chat.py b/ex_app/lib/all_tools/context_chat.py index d7a25fb..e1cc304 100644 --- a/ex_app/lib/all_tools/context_chat.py +++ b/ex_app/lib/all_tools/context_chat.py @@ -35,4 +35,5 @@ def get_category_name(): return "Context chat" def is_available(nc: Nextcloud): - return 'context_chat' in nc.apps.get_list() \ No newline at end of file + tasktypes = nc.ocs('GET', '/ocs/v2.php/taskprocessing/tasktypes')['types'].keys() + return 'context_chat:context_chat' in tasktypes \ No newline at end of file diff --git a/ex_app/lib/all_tools/mail.py b/ex_app/lib/all_tools/mail.py index 7b30662..fc03a45 100644 --- a/ex_app/lib/all_tools/mail.py +++ b/ex_app/lib/all_tools/mail.py @@ -67,4 +67,8 @@ def get_category_name(): return "Mail" def is_available(nc: Nextcloud): - return 'mail' in nc.apps.get_list() \ No newline at end of file + try: + res = nc.ocs('GET', '/ocs/v2.php/apps/mail/account/list') + except: + return False + return True \ No newline at end of file