Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[experiments] Objects in Chats #2438

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 21 additions & 10 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 5 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,7 @@ default-features = false
# version = "0.11.1"
git = "https://github.com/ruma/ruma"
rev = "c91499fc464adc865a7c99d0ce0b35982ad96711"

# - see comment above
[workspace.dependencies.ruma-common]
# version = "0.14.1"
git = "https://github.com/ruma/ruma"
rev = "c91499fc464adc865a7c99d0ce0b35982ad96711"
features = ["unstable-msc2326"]

[workspace.dependencies.url]
version = "2.5.0"
Expand All @@ -78,3 +73,7 @@ strip = true # Automatically strip symbols from the binary.

[patch.crates-io]
const_panic = { git = "https://github.com/jplatte/const_panic", rev = "9024a4cb3eac45c1d2d980f17aaee287b17be498" }
[patch.'https://github.com/ruma/ruma']
ruma = { git = "https://github.com/acterglobal/ruma", branch = "ben-msc2326"}
ruma-events = { git = "https://github.com/acterglobal/ruma", branch = "ben-msc2326"}
ruma-client-api = { git = "https://github.com/acterglobal/ruma", branch = "ben-msc2326"}
3 changes: 1 addition & 2 deletions native/acter/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,7 @@ tracing-log = { version = "0.2", optional = true }
console-subscriber = { version = "0.2.0", optional = true }

# not used directly but needed to enable specific features from ruma
ruma = { workspace = true, features = ["html", "rand", "unstable-msc2448", "unstable-msc2965", "unstable-msc3930", "unstable-msc3245-v1-compat"] }
ruma-common = { workspace = true, features = ["client", "unstable-unspecified"] }
ruma = { workspace = true, features = ["html", "rand", "unstable-unspecified", "unstable-msc2448", "unstable-msc2965", "unstable-msc3930", "unstable-msc3245-v1-compat"] }

[dev-dependencies]
tempfile = "3.9.0"
Expand Down
1 change: 1 addition & 0 deletions native/core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ templates = ["toml", "minijinja", "indexmap", "tokio-retry"]
client = []
server = []
unstable-exhaustive-types = []
ruma_unstable_exhaustive_types = []

[dependencies]
tokio = { version = "1", features = ["rt", "macros"] }
Expand Down
3 changes: 2 additions & 1 deletion util/test_server/.config/acter-synapse-ci/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
FROM ghcr.io/matrix-org/synapse:latest
FROM ghcr.io/element-hq/synapse:latest
RUN apt-get update && apt-get install git -y
RUN pip install git+https://github.com/acterglobal/synapse-super-invites/@ben-share-link-generator
ADD homeserver.local.yml /data/homeserver.local.yml
ADD ci-start.sh /ci-start.sh
RUN chmod 770 /ci-start.sh
ENTRYPOINT /ci-start.sh
89 changes: 12 additions & 77 deletions util/test_server/.config/acter-synapse-ci/ci-start.sh
Original file line number Diff line number Diff line change
@@ -1,81 +1,16 @@
#!/bin/bash
set -e
export SYNAPSE_SERVER_NAME=localhost
export SYNAPSE_REPORT_STATS=no
echo " ====== Generating config ====== "
/start.py generate
echo " ====== Patching for local fixes ====== "
echo """

email:
smtp_host: mailhog
smtp_port: 1025
force_tls: false
require_transport_security: false
enable_tls: false
notif_from: \"Your Friendly %(app)s homeserver <[email protected]>\"
can_verify_email: true

allow_guest_access: true
enable_registration_without_verification: true
enable_registration: true
suppress_key_server_warning: true

rc_message:
per_second: 1000
burst_count: 1000

rc_registration:
per_second: 1000
burst_count: 1000

rc_login:
address:
per_second: 1000
burst_count: 1000
account:
per_second: 1000
burst_count: 1000
failed_attempts:
per_second: 1000
burst_count: 1000

rc_admin_redaction:
per_second: 1000
burst_count: 1000

rc_joins:
local:
per_second: 1000
burst_count: 1000
remote:
per_second: 1000
burst_count: 1000

rc_3pid_validation:
per_second: 1000
burst_count: 1000

rc_invites:
per_room:
per_second: 1000
burst_count: 1000
per_user:
per_second: 1000
burst_count: 1000

modules:
- module: \"synapse_super_invites.SynapseSuperInvites\"
config:
sql_url: sqlite:///data/super_invites.db
generate_registration_token: true
share_link_generator:
url_prefix: "http://localhost:8099/"
target_path: "/data/share_links/"

""" >> /data/homeserver.yaml

echo " ====== Starting server with: ====== "
cat /data/homeserver.yaml
if [ ! -f /data/homeserver.yaml ]; then
export SYNAPSE_SERVER_NAME=localhost
export SYNAPSE_REPORT_STATS=no
echo " ====== Generating config ====== "
/start.py generate
echo " ====== Patching for local fixes ====== "
echo cat /data/homeserver.local.yaml >> /data/homeserver.yaml
echo " ====== Starting server with: ====== "
cat /data/homeserver.yaml
else
echo "Configuration already exists, ignoring"
fi;
echo " ====== STARTING ====== "
/start.py run
71 changes: 71 additions & 0 deletions util/test_server/.config/acter-synapse-ci/homeserver.local.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@

email:
smtp_host: mailhog
smtp_port: 1025
force_tls: false
require_transport_security: false
enable_tls: false
notif_from: "Your Friendly %(app)s homeserver <[email protected]>"
can_verify_email: true

allow_guest_access: true
enable_registration_without_verification: true
enable_registration: true
suppress_key_server_warning: true

opentracing:
enabled: true
homeserver_whitelist:
- ".*"

rc_message:
per_second: 1000
burst_count: 1000

rc_registration:
per_second: 1000
burst_count: 1000

rc_login:
address:
per_second: 1000
burst_count: 1000
account:
per_second: 1000
burst_count: 1000
failed_attempts:
per_second: 1000
burst_count: 1000

rc_admin_redaction:
per_second: 1000
burst_count: 1000

rc_joins:
local:
per_second: 1000
burst_count: 1000
remote:
per_second: 1000
burst_count: 1000

rc_3pid_validation:
per_second: 1000
burst_count: 1000

rc_invites:
per_room:
per_second: 1000
burst_count: 1000
per_user:
per_second: 1000
burst_count: 1000

modules:
- module: "synapse_super_invites.SynapseSuperInvites"
config:
sql_url: sqlite:///data/super_invites.db
generate_registration_token: true
share_link_generator:
url_prefix: "http://localhost:8099/"
target_path: "/data/share_links/"
6 changes: 6 additions & 0 deletions util/test_server/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,9 @@ services:
- synapse
entrypoint: "/bin/bash -c"
command: '"register_new_matrix_user -u admin -p admin -a -c /data/homeserver.yaml http://synapse:8008"'

jaeger:
image: jaegertracing/all-in-one:latest
ports:
- "6831:6831/udp"
- "16686:16686"
Loading