Mercurial > libervia-backend
comparison libervia/backend/plugins/plugin_xep_0384.py @ 4218:c0f3f29377f1
plugin XEP-0384: be sure to have `open` access model for created nodes.
author | Goffi <goffi@goffi.org> |
---|---|
date | Tue, 05 Mar 2024 17:31:36 +0100 |
parents | 1a7a3e4b52a4 |
children | 1b5cf2ee1d86 |
comparison
equal
deleted
inserted
replaced
4217:b53b6dc1f929 | 4218:c0f3f29377f1 |
---|---|
871 node, | 871 node, |
872 xml_tools.et_elt_2_domish_elt(element), | 872 xml_tools.et_elt_2_domish_elt(element), |
873 item_id=str(bundle.device_id), | 873 item_id=str(bundle.device_id), |
874 extra={ | 874 extra={ |
875 XEP_0060.EXTRA_PUBLISH_OPTIONS: { | 875 XEP_0060.EXTRA_PUBLISH_OPTIONS: { |
876 XEP_0060.OPT_ACCESS_MODEL: "open", | |
876 XEP_0060.OPT_MAX_ITEMS: "max" | 877 XEP_0060.OPT_MAX_ITEMS: "max" |
877 }, | 878 }, |
878 XEP_0060.EXTRA_ON_PRECOND_NOT_MET: "raise" | 879 XEP_0060.EXTRA_ON_PRECOND_NOT_MET: "raise" |
879 } | 880 } |
880 ) | 881 ) |
910 client.jid.userhostJID(), | 911 client.jid.userhostJID(), |
911 node, | 912 node, |
912 xml_tools.et_elt_2_domish_elt(element), | 913 xml_tools.et_elt_2_domish_elt(element), |
913 item_id=xep_0060.ID_SINGLETON, | 914 item_id=xep_0060.ID_SINGLETON, |
914 extra={ | 915 extra={ |
915 XEP_0060.EXTRA_PUBLISH_OPTIONS: { XEP_0060.OPT_MAX_ITEMS: 1 }, | 916 XEP_0060.EXTRA_PUBLISH_OPTIONS: { |
917 XEP_0060.OPT_ACCESS_MODEL: "open", | |
918 XEP_0060.OPT_MAX_ITEMS: 1 | |
919 }, | |
916 XEP_0060.EXTRA_ON_PRECOND_NOT_MET: "publish_without_options" | 920 XEP_0060.EXTRA_ON_PRECOND_NOT_MET: "publish_without_options" |
917 } | 921 } |
918 ) | 922 ) |
919 except Exception as e: | 923 except Exception as e: |
920 raise omemo.BundleUploadFailed( | 924 raise omemo.BundleUploadFailed( |