Skip to content

Commit

Permalink
registering user matrix-org#2
Browse files Browse the repository at this point in the history
  • Loading branch information
lxndrbnsv committed Jan 10, 2022
1 parent 56947cd commit 932db15
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions synapse/qn/user_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import psycopg2

from synapse.qn.utils import QnConfig as cfg
from synapse.handlers.register import RegistrationHandler


class GetRoomMembersFromDB:
Expand Down Expand Up @@ -63,23 +64,12 @@ def __init__(self, email):
password = response_dict["password"]

if status is False:
register_new_user = (
f"/home/matrix/synapse/env/bin/python3 /home/matrix/synapse/synapse/_scripts"
f"/register_new_matrix_user.py -u"
f" {username} -p"
f" '{password}' --no-admin -c /home/matrix/synapse/"
f"homeserver.yaml https://matrix.m.mybusines.app:443"
)
register = subprocess.Popen(
register_new_user, stdout=subprocess.PIPE, shell=True
)
out = register.stdout.read().decode()

RegistrationHandler(hs="https:/matrix.m.mybusines.app")

with open("/home/matrix/logs/logs_from_user_data_module.log", "a+") as text_file:
text_file.write(
str(datetime.datetime.now())
+ "\n" + username
+ "\n" + register_new_user
+ "\n" + out
+ "\n--- --- ---"
)

0 comments on commit 932db15

Please sign in to comment.