Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Revert "Merge branch 'develop' into babolivier/account_expiration"
Browse files Browse the repository at this point in the history
This reverts commit 8631413, reversing
changes made to 0650483.
  • Loading branch information
babolivier committed Apr 17, 2019
1 parent d20142c commit af5d18e
Show file tree
Hide file tree
Showing 190 changed files with 4,789 additions and 4,916 deletions.
1 change: 0 additions & 1 deletion changelog.d/4474.misc

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/4555.bugfix

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/4942.bugfix

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/4947.feature

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/4949.misc

This file was deleted.

2 changes: 0 additions & 2 deletions changelog.d/4953.misc

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/4954.misc

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/4955.bugfix

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/4956.bugfix

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/4959.misc

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/4965.misc

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/4968.misc

This file was deleted.

2 changes: 0 additions & 2 deletions changelog.d/4969.misc

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/4974.misc

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/4981.bugfix

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/4982.misc

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/4985.misc

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/4987.misc

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/4989.feature

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/4990.bugfix

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/4991.feature

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/4992.misc

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/4996.misc

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/4998.misc

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/4999.bugfix

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/5001.misc

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/5002.feature

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/5003.bugfix

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/5007.misc

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/5010.feature

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/5020.feature

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/5024.misc

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/5028.misc

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/5030.misc

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/5032.bugfix

This file was deleted.

20 changes: 5 additions & 15 deletions demo/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,27 +27,17 @@ for port in 8080 8081 8082; do
--config-path "$DIR/etc/$port.config" \
--report-stats no

printf '\n\n# Customisation made by demo/start.sh\n' >> $DIR/etc/$port.config
echo 'enable_registration: true' >> $DIR/etc/$port.config

# Check script parameters
if [ $# -eq 1 ]; then
if [ $1 = "--no-rate-limit" ]; then
# messages rate limit
echo 'rc_messages_per_second: 1000' >> $DIR/etc/$port.config
echo 'rc_message_burst_count: 1000' >> $DIR/etc/$port.config

# registration rate limit
printf 'rc_registration:\n per_second: 1000\n burst_count: 1000\n' >> $DIR/etc/$port.config

# login rate limit
echo 'rc_login:' >> $DIR/etc/$port.config
printf ' address:\n per_second: 1000\n burst_count: 1000\n' >> $DIR/etc/$port.config
printf ' account:\n per_second: 1000\n burst_count: 1000\n' >> $DIR/etc/$port.config
printf ' failed_attempts:\n per_second: 1000\n burst_count: 1000\n' >> $DIR/etc/$port.config
# Set high limits in config file to disable rate limiting
perl -p -i -e 's/rc_messages_per_second.*/rc_messages_per_second: 1000/g' $DIR/etc/$port.config
perl -p -i -e 's/rc_message_burst_count.*/rc_message_burst_count: 1000/g' $DIR/etc/$port.config
fi
fi

perl -p -i -e 's/^enable_registration:.*/enable_registration: true/g' $DIR/etc/$port.config

if ! grep -F "full_twisted_stacktraces" -q $DIR/etc/$port.config; then
echo "full_twisted_stacktraces: true" >> $DIR/etc/$port.config
fi
Expand Down
10 changes: 4 additions & 6 deletions docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ docker run \
--mount type=volume,src=synapse-data,dst=/data \
-e SYNAPSE_SERVER_NAME=my.matrix.host \
-e SYNAPSE_REPORT_STATS=yes \
-p 8448:8448 \
matrixdotorg/synapse:latest
```

Expand All @@ -58,10 +57,9 @@ configuration file there. Multiple application services are supported.
Synapse requires a valid TLS certificate. You can do one of the following:

* Provide your own certificate and key (as
`${DATA_PATH}/${SYNAPSE_SERVER_NAME}.tls.crt` and
`${DATA_PATH}/${SYNAPSE_SERVER_NAME}.tls.key`, or elsewhere by providing an
entire config as `${SYNAPSE_CONFIG_PATH}`). In this case, you should forward
traffic to port 8448 in the container, for example with `-p 443:8448`.
`${DATA_PATH}/${SYNAPSE_SERVER_NAME}.crt` and
`${DATA_PATH}/${SYNAPSE_SERVER_NAME}.key`, or elsewhere by providing an
entire config as `${SYNAPSE_CONFIG_PATH}`).

* Use a reverse proxy to terminate incoming TLS, and forward the plain http
traffic to port 8008 in the container. In this case you should set `-e
Expand Down Expand Up @@ -139,7 +137,7 @@ Database specific values (will use SQLite if not set):
**NOTE**: You are highly encouraged to use postgresql! Please use the compose
file to make it easier to deploy.
* `POSTGRES_USER` - The user for the synapse postgres database. [default:
`synapse`]
`matrix`]

Mail server specific values (will not send emails if not set):

Expand Down
14 changes: 0 additions & 14 deletions docs/admin_api/delete_group.md

This file was deleted.

7 changes: 0 additions & 7 deletions docs/sample_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -236,9 +236,6 @@ listeners:
# - medium: 'email'
# address: '[email protected]'

# Used by phonehome stats to group together related servers.
#server_context: context


## TLS ##

Expand Down Expand Up @@ -694,10 +691,6 @@ uploads_path: "DATADIR/uploads"
# - medium: msisdn
# pattern: '\+44'

# Enable 3PIDs lookup requests to identity servers from this server.
#
#enable_3pid_lookup: true

# If set, allows registration of standard or admin accounts by anyone who
# has the shared secret, even if registration is otherwise disabled.
#
Expand Down
7 changes: 6 additions & 1 deletion scripts/synapse_port_db
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,15 @@ BOOLEAN_COLUMNS = {


APPEND_ONLY_TABLES = [
"event_content_hashes",
"event_reference_hashes",
"event_signatures",
"event_edge_hashes",
"events",
"event_json",
"state_events",
"room_memberships",
"feedback",
"topics",
"room_names",
"rooms",
Expand All @@ -84,6 +88,7 @@ APPEND_ONLY_TABLES = [
"event_search",
"presence_stream",
"push_rules_stream",
"current_state_resets",
"ex_outlier_stream",
"cache_invalidation_stream",
"public_room_list_stream",
Expand Down Expand Up @@ -806,7 +811,7 @@ class CursesProgress(Progress):
middle_space = 1

items = self.tables.items()
items = sorted(items, key=lambda i: (i[1]["perc"], i[0]))
items.sort(key=lambda i: (i[1]["perc"], i[0]))

for i, (table, data) in enumerate(items):
if i + 2 >= rows:
Expand Down
41 changes: 40 additions & 1 deletion synapse/api/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ class EventTypes(object):
Redaction = "m.room.redaction"
ThirdPartyInvite = "m.room.third_party_invite"
Encryption = "m.room.encryption"
RelatedGroups = "m.room.related_groups"

RoomHistoryVisibility = "m.room.history_visibility"
CanonicalAlias = "m.room.canonical_alias"
Expand Down Expand Up @@ -103,6 +102,46 @@ class ThirdPartyEntityKind(object):
LOCATION = "location"


class RoomVersions(object):
V1 = "1"
V2 = "2"
V3 = "3"
STATE_V2_TEST = "state-v2-test"


class RoomDisposition(object):
STABLE = "stable"
UNSTABLE = "unstable"


# the version we will give rooms which are created on this server
DEFAULT_ROOM_VERSION = RoomVersions.V1

# vdh-test-version is a placeholder to get room versioning support working and tested
# until we have a working v2.
KNOWN_ROOM_VERSIONS = {
RoomVersions.V1,
RoomVersions.V2,
RoomVersions.V3,
RoomVersions.STATE_V2_TEST,
RoomVersions.V3,
}


class EventFormatVersions(object):
"""This is an internal enum for tracking the version of the event format,
independently from the room version.
"""
V1 = 1
V2 = 2


KNOWN_EVENT_FORMAT_VERSIONS = {
EventFormatVersions.V1,
EventFormatVersions.V2,
}


ServerNoticeMsgType = "m.server_notice"
ServerNoticeLimitReached = "m.server_notice.usage_limit_reached"

Expand Down
91 changes: 0 additions & 91 deletions synapse/api/room_versions.py

This file was deleted.

2 changes: 1 addition & 1 deletion synapse/app/federation_sender.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
from synapse.replication.slave.storage.registration import SlavedRegistrationStore
from synapse.replication.slave.storage.transactions import SlavedTransactionStore
from synapse.replication.tcp.client import ReplicationClientHandler
from synapse.replication.tcp.streams._base import ReceiptsStream
from synapse.replication.tcp.streams import ReceiptsStream
from synapse.server import HomeServer
from synapse.storage.engines import create_engine
from synapse.types import ReadReceipt
Expand Down
2 changes: 1 addition & 1 deletion synapse/app/homeserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,6 @@ def phone_stats_home():
uptime = 0

stats["homeserver"] = hs.config.server_name
stats["server_context"] = hs.config.server_context
stats["timestamp"] = now
stats["uptime_seconds"] = uptime
version = sys.version_info
Expand Down Expand Up @@ -559,6 +558,7 @@ def phone_stats_home():

stats["database_engine"] = hs.get_datastore().database_engine_name
stats["database_server_version"] = hs.get_datastore().get_server_version()

logger.info("Reporting stats to matrix.org: %s" % (stats,))
try:
yield hs.get_simple_http_client().put_json(
Expand Down
Loading

0 comments on commit af5d18e

Please sign in to comment.