Replace instance variations of homeserver with correct case/spacing

This commit is contained in:
Andrew Morgan 2019-11-12 13:08:12 +00:00
parent 963ffb60b9
commit bc29a19731
18 changed files with 31 additions and 31 deletions

View File

@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
""" This is a reference implementation of a Matrix home server. """ This is a reference implementation of a Matrix homeserver.
""" """
import os import os

View File

@ -144,8 +144,8 @@ def main():
logging.captureWarnings(True) logging.captureWarnings(True)
parser = argparse.ArgumentParser( parser = argparse.ArgumentParser(
description="Used to register new users with a given home server when" description="Used to register new users with a given homeserver when"
" registration has been disabled. The home server must be" " registration has been disabled. The homeserver must be"
" configured with the 'registration_shared_secret' option" " configured with the 'registration_shared_secret' option"
" set." " set."
) )
@ -202,7 +202,7 @@ def main():
"server_url", "server_url",
default="https://localhost:8448", default="https://localhost:8448",
nargs="?", nargs="?",
help="URL to use to talk to the home server. Defaults to " help="URL to use to talk to the homeserver. Defaults to "
" 'https://localhost:8448'.", " 'https://localhost:8448'.",
) )

View File

@ -457,7 +457,7 @@ def cs_error(msg, code=Codes.UNKNOWN, **kwargs):
class FederationError(RuntimeError): class FederationError(RuntimeError):
""" This class is used to inform remote home servers about erroneous """ This class is used to inform remote homeservers about erroneous
PDUs they sent us. PDUs they sent us.
FATAL: The remote server could not interpret the source event. FATAL: The remote server could not interpret the source event.

View File

@ -35,11 +35,11 @@ class CaptchaConfig(Config):
## Captcha ## ## Captcha ##
# See docs/CAPTCHA_SETUP for full details of configuring this. # See docs/CAPTCHA_SETUP for full details of configuring this.
# This Home Server's ReCAPTCHA public key. # This homeserver's ReCAPTCHA public key.
# #
#recaptcha_public_key: "YOUR_PUBLIC_KEY" #recaptcha_public_key: "YOUR_PUBLIC_KEY"
# This Home Server's ReCAPTCHA private key. # This homeserver's ReCAPTCHA private key.
# #
#recaptcha_private_key: "YOUR_PRIVATE_KEY" #recaptcha_private_key: "YOUR_PRIVATE_KEY"

View File

@ -305,7 +305,7 @@ class EmailConfig(Config):
# smtp_user: "exampleusername" # smtp_user: "exampleusername"
# smtp_pass: "examplepassword" # smtp_pass: "examplepassword"
# require_transport_security: false # require_transport_security: false
# notif_from: "Your Friendly %(app)s Home Server <noreply@example.com>" # notif_from: "Your Friendly %(app)s homeserver <noreply@example.com>"
# app_name: Matrix # app_name: Matrix
# #
# # Enable email notifications by default # # Enable email notifications by default

View File

@ -781,7 +781,7 @@ class ServerConfig(Config):
"--daemonize", "--daemonize",
action="store_true", action="store_true",
default=None, default=None,
help="Daemonize the home server", help="Daemonize the homeserver",
) )
server_group.add_argument( server_group.add_argument(
"--print-pidfile", "--print-pidfile",

View File

@ -177,7 +177,7 @@ class FederationClient(FederationBase):
given destination server. given destination server.
Args: Args:
dest (str): The remote home server to ask. dest (str): The remote homeserver to ask.
room_id (str): The room_id to backfill. room_id (str): The room_id to backfill.
limit (int): The maximum number of PDUs to return. limit (int): The maximum number of PDUs to return.
extremities (list): List of PDU id and origins of the first pdus extremities (list): List of PDU id and origins of the first pdus
@ -227,7 +227,7 @@ class FederationClient(FederationBase):
one succeeds. one succeeds.
Args: Args:
destinations (list): Which home servers to query destinations (list): Which homeservers to query
event_id (str): event to fetch event_id (str): event to fetch
room_version (str): version of the room room_version (str): version of the room
outlier (bool): Indicates whether the PDU is an `outlier`, i.e. if outlier (bool): Indicates whether the PDU is an `outlier`, i.e. if
@ -312,7 +312,7 @@ class FederationClient(FederationBase):
@defer.inlineCallbacks @defer.inlineCallbacks
@log_function @log_function
def get_state_for_room(self, destination, room_id, event_id): def get_state_for_room(self, destination, room_id, event_id):
"""Requests all of the room state at a given event from a remote home server. """Requests all of the room state at a given event from a remote homeserver.
Args: Args:
destination (str): The remote homeserver to query for the state. destination (str): The remote homeserver to query for the state.

View File

@ -14,9 +14,9 @@
# limitations under the License. # limitations under the License.
"""The transport layer is responsible for both sending transactions to remote """The transport layer is responsible for both sending transactions to remote
home servers and receiving a variety of requests from other home servers. homeservers and receiving a variety of requests from other homeservers.
By default this is done over HTTPS (and all home servers are required to By default this is done over HTTPS (and all homeservers are required to
support HTTPS), however individual pairings of servers may decide to support HTTPS), however individual pairings of servers may decide to
communicate over a different (albeit still reliable) protocol. communicate over a different (albeit still reliable) protocol.
""" """

View File

@ -44,7 +44,7 @@ class TransportLayerClient(object):
given event. given event.
Args: Args:
destination (str): The host name of the remote home server we want destination (str): The host name of the remote homeserver we want
to get the state from. to get the state from.
context (str): The name of the context we want the state of context (str): The name of the context we want the state of
event_id (str): The event we want the context at. event_id (str): The event we want the context at.
@ -68,7 +68,7 @@ class TransportLayerClient(object):
given event. Returns the state's event_id's given event. Returns the state's event_id's
Args: Args:
destination (str): The host name of the remote home server we want destination (str): The host name of the remote homeserver we want
to get the state from. to get the state from.
context (str): The name of the context we want the state of context (str): The name of the context we want the state of
event_id (str): The event we want the context at. event_id (str): The event we want the context at.
@ -91,7 +91,7 @@ class TransportLayerClient(object):
""" Requests the pdu with give id and origin from the given server. """ Requests the pdu with give id and origin from the given server.
Args: Args:
destination (str): The host name of the remote home server we want destination (str): The host name of the remote homeserver we want
to get the state from. to get the state from.
event_id (str): The id of the event being requested. event_id (str): The id of the event being requested.
timeout (int): How long to try (in ms) the destination for before timeout (int): How long to try (in ms) the destination for before

View File

@ -714,7 +714,7 @@ class PublicRoomList(BaseFederationServlet):
This API returns information in the same format as /publicRooms on the This API returns information in the same format as /publicRooms on the
client API, but will only ever include local public rooms and hence is client API, but will only ever include local public rooms and hence is
intended for consumption by other home servers. intended for consumption by other homeservers.
GET /publicRooms HTTP/1.1 GET /publicRooms HTTP/1.1

View File

@ -223,7 +223,7 @@ class AuthHandler(BaseHandler):
# could continue registration from your phone having clicked the # could continue registration from your phone having clicked the
# email auth link on there). It's probably too open to abuse # email auth link on there). It's probably too open to abuse
# because it lets unauthenticated clients store arbitrary objects # because it lets unauthenticated clients store arbitrary objects
# on a home server. # on a homeserver.
# Revisit: Assumimg the REST APIs do sensible validation, the data # Revisit: Assumimg the REST APIs do sensible validation, the data
# isn't arbintrary. # isn't arbintrary.
session["clientdict"] = clientdict session["clientdict"] = clientdict
@ -810,7 +810,7 @@ class AuthHandler(BaseHandler):
@defer.inlineCallbacks @defer.inlineCallbacks
def add_threepid(self, user_id, medium, address, validated_at): def add_threepid(self, user_id, medium, address, validated_at):
# 'Canonicalise' email addresses down to lower case. # 'Canonicalise' email addresses down to lower case.
# We've now moving towards the Home Server being the entity that # We've now moving towards the homeserver being the entity that
# is responsible for validating threepids used for resetting passwords # is responsible for validating threepids used for resetting passwords
# on accounts, so in future Synapse will gain knowledge of specific # on accounts, so in future Synapse will gain knowledge of specific
# types (mediums) of threepid. For now, we still use the existing # types (mediums) of threepid. For now, we still use the existing

View File

@ -283,7 +283,7 @@ class DirectoryHandler(BaseHandler):
def on_directory_query(self, args): def on_directory_query(self, args):
room_alias = RoomAlias.from_string(args["room_alias"]) room_alias = RoomAlias.from_string(args["room_alias"])
if not self.hs.is_mine(room_alias): if not self.hs.is_mine(room_alias):
raise SynapseError(400, "Room Alias is not hosted on this Home Server") raise SynapseError(400, "Room Alias is not hosted on this homeserver")
result = yield self.get_association_from_room_alias(room_alias) result = yield self.get_association_from_room_alias(room_alias)

View File

@ -97,9 +97,9 @@ class FederationHandler(BaseHandler):
"""Handles events that originated from federation. """Handles events that originated from federation.
Responsible for: Responsible for:
a) handling received Pdus before handing them on as Events to the rest a) handling received Pdus before handing them on as Events to the rest
of the home server (including auth and state conflict resoultion) of the homeserver (including auth and state conflict resoultion)
b) converting events that were produced by local clients that may need b) converting events that were produced by local clients that may need
to be sent to remote home servers. to be sent to remote homeservers.
c) doing the necessary dances to invite remote users and join remote c) doing the necessary dances to invite remote users and join remote
rooms. rooms.
""" """

View File

@ -152,7 +152,7 @@ class BaseProfileHandler(BaseHandler):
by_admin (bool): Whether this change was made by an administrator. by_admin (bool): Whether this change was made by an administrator.
""" """
if not self.hs.is_mine(target_user): if not self.hs.is_mine(target_user):
raise SynapseError(400, "User is not hosted on this Home Server") raise SynapseError(400, "User is not hosted on this homeserver")
if not by_admin and target_user != requester.user: if not by_admin and target_user != requester.user:
raise AuthError(400, "Cannot set another user's displayname") raise AuthError(400, "Cannot set another user's displayname")
@ -207,7 +207,7 @@ class BaseProfileHandler(BaseHandler):
"""target_user is the user whose avatar_url is to be changed; """target_user is the user whose avatar_url is to be changed;
auth_user is the user attempting to make this change.""" auth_user is the user attempting to make this change."""
if not self.hs.is_mine(target_user): if not self.hs.is_mine(target_user):
raise SynapseError(400, "User is not hosted on this Home Server") raise SynapseError(400, "User is not hosted on this homeserver")
if not by_admin and target_user != requester.user: if not by_admin and target_user != requester.user:
raise AuthError(400, "Cannot set another user's avatar_url") raise AuthError(400, "Cannot set another user's avatar_url")
@ -231,7 +231,7 @@ class BaseProfileHandler(BaseHandler):
def on_profile_query(self, args): def on_profile_query(self, args):
user = UserID.from_string(args["user_id"]) user = UserID.from_string(args["user_id"])
if not self.hs.is_mine(user): if not self.hs.is_mine(user):
raise SynapseError(400, "User is not hosted on this Home Server") raise SynapseError(400, "User is not hosted on this homeserver")
just_field = args.get("field", None) just_field = args.get("field", None)

View File

@ -630,7 +630,7 @@ class RegistrationHandler(BaseHandler):
# And we add an email pusher for them by default, but only # And we add an email pusher for them by default, but only
# if email notifications are enabled (so people don't start # if email notifications are enabled (so people don't start
# getting mail spam where they weren't before if email # getting mail spam where they weren't before if email
# notifs are set up on a home server) # notifs are set up on a homeserver)
if ( if (
self.hs.config.email_enable_notifs self.hs.config.email_enable_notifs
and self.hs.config.email_notif_for_new_users and self.hs.config.email_notif_for_new_users

View File

@ -120,7 +120,7 @@ class TypingHandler(object):
auth_user_id = auth_user.to_string() auth_user_id = auth_user.to_string()
if not self.is_mine_id(target_user_id): if not self.is_mine_id(target_user_id):
raise SynapseError(400, "User is not hosted on this Home Server") raise SynapseError(400, "User is not hosted on this homeserver")
if target_user_id != auth_user_id: if target_user_id != auth_user_id:
raise AuthError(400, "Cannot set another user's typing state") raise AuthError(400, "Cannot set another user's typing state")
@ -150,7 +150,7 @@ class TypingHandler(object):
auth_user_id = auth_user.to_string() auth_user_id = auth_user.to_string()
if not self.is_mine_id(target_user_id): if not self.is_mine_id(target_user_id):
raise SynapseError(400, "User is not hosted on this Home Server") raise SynapseError(400, "User is not hosted on this homeserver")
if target_user_id != auth_user_id: if target_user_id != auth_user_id:
raise AuthError(400, "Cannot set another user's typing state") raise AuthError(400, "Cannot set another user's typing state")

View File

@ -530,7 +530,7 @@ class MatrixFederationHttpClient(object):
""" """
Builds the Authorization headers for a federation request Builds the Authorization headers for a federation request
Args: Args:
destination (bytes|None): The desination home server of the request. destination (bytes|None): The desination homeserver of the request.
May be None if the destination is an identity server, in which case May be None if the destination is an identity server, in which case
destination_is must be non-None. destination_is must be non-None.
method (bytes): The HTTP method of the request method (bytes): The HTTP method of the request

View File

@ -20,7 +20,7 @@ logger = logging.getLogger(__name__)
def create_resource_tree(desired_tree, root_resource): def create_resource_tree(desired_tree, root_resource):
"""Create the resource tree for this Home Server. """Create the resource tree for this homeserver.
This in unduly complicated because Twisted does not support putting This in unduly complicated because Twisted does not support putting
child resources more than 1 level deep at a time. child resources more than 1 level deep at a time.