Skip to content
Snippets Groups Projects
Commit 5e190d14 authored by Benoit Alessandroni's avatar Benoit Alessandroni
Browse files

update: fixing subscriptions generation

parent b4f18e61
No related branches found
No related tags found
1 merge request!52prosody: adapt membership notifications subscriptions
Pipeline #13133 passed
......@@ -10,16 +10,39 @@ class Command(BaseCommand):
jabber_host = getattr(settings, 'JABBER_DEFAULT_HOST')
xmpp = getattr(settings, 'PROSODY_HTTP_URL')
Subscription.objects.get_or_create(object=host+"/circles/", inbox=xmpp + "/conference." + jabber_host + "/happydev_muc_admin", field=None)
# Subscription.objects.get_or_create(object=host+"/circle-members/", inbox=xmpp + "/conference." + jabber_host + "/happydev_muc_admin", field="circle")
Subscription.objects.get_or_create(object=host+"/projects/", inbox=xmpp + "/conference." + jabber_host + "/happydev_muc_admin", field=None)
# Subscription.objects.get_or_create(object=host+"/project-members/", inbox=xmpp + "/conference." + jabber_host + "/happydev_muc_admin", field="project")
try:
sub = Subscription.objects.get(object="{}/circles/".format(host))
sub.delete()
except Subscription.DoesNotExist:
pass
try:
sub = Subscription.objects.get(object="{}/projects/".format(host))
sub.delete()
except Subscription.DoesNotExist:
pass
try:
sub = Subscription.objects.get(object="{}/circle-members/".format(host))
sub.delete()
except Subscription.DoesNotExist:
pass
try:
sub = Subscription.objects.get(object="{}/project-members/".format(host))
sub.delete()
except Subscription.DoesNotExist:
pass
Subscription.objects.get_or_create(object=host+"/circles/", inbox=xmpp + "/conference." + jabber_host + "/startinblox_muc_admin", field=None)
Subscription.objects.get_or_create(object=host+"/projects/", inbox=xmpp + "/conference." + jabber_host + "/startinblox_muc_admin", field=None)
Subscription.objects.get_or_create(object=host+"/users/", inbox=xmpp + "/" + jabber_host + "/happydev_user_admin", field=None)
Subscription.objects.get_or_create(object=host+"/profiles/", inbox=xmpp + "/" + jabber_host + "/happydev_user_admin", field="user")
Subscription.objects.get_or_create(object=host+"/chatprofiles/", inbox=xmpp + "/" + jabber_host + "/happydev_user_admin", field="user")
Subscription.objects.get_or_create(object=host+"/accounts/", inbox=xmpp + "/" + jabber_host + "/happydev_user_admin", field="user")
Subscription.objects.get_or_create(object=host+"/circle-members/", inbox=xmpp + "/conference." + jabber_host + "/startinblox_muc_members_admin")
Subscription.objects.get_or_create(object=host+"/project-members/", inbox=xmpp + "/conference." + jabber_host + "/startinblox_muc_members_admin")
Subscription.objects.get_or_create(object=host+"/circle-members/", inbox=xmpp + "/conference." + jabber_host + "/startinblox_muc_members_admin", field=None)
Subscription.objects.get_or_create(object=host+"/project-members/", inbox=xmpp + "/conference." + jabber_host + "/startinblox_muc_members_admin", field=None)
self.stdout.write(self.style.SUCCESS("Successfully created subscriptions\nhost: "+host+"\nxmpp server: "+xmpp+"\njabber host: "+jabber_host))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment