Newer
Older
from urllib.parse import urljoin
from aleksis.core.util.core_helpers import get_site_preferences
class MatrixException(Exception):
pass
def build_url(path):
return urljoin(
urljoin(get_site_preferences()["matrix__homeserver"], "_matrix/client/v3/"), path
)
def get_headers():
return {
"Authorization": "Bearer " + get_site_preferences()["matrix__access_token"],
}