From da2023ba0405bfed197f7e1cdd080380ef60c9f0 Mon Sep 17 00:00:00 2001 From: S7evinK Date: Tue, 20 Jul 2021 10:45:40 +0200 Subject: [PATCH] Rename Riot to Element (#1874) * s/riot/element/g Signed-off-by: Till Faelligen * fix formatting Co-authored-by: kegsay Co-authored-by: Neil Alexander --- clientapi/auth/user_interactive.go | 2 +- .../{embed_riotweb.go => embed_elementweb.go} | 10 +++++----- cmd/dendrite-demo-pinecone/embed/embed_other.go | 2 +- .../{embed_riotweb.go => embed_elementweb.go} | 14 +++++++------- cmd/dendrite-demo-yggdrasil/embed/embed_other.go | 2 +- syncapi/routing/messages.go | 2 +- 6 files changed, 16 insertions(+), 16 deletions(-) rename cmd/dendrite-demo-pinecone/embed/{embed_riotweb.go => embed_elementweb.go} (90%) rename cmd/dendrite-demo-yggdrasil/embed/{embed_riotweb.go => embed_elementweb.go} (85%) diff --git a/clientapi/auth/user_interactive.go b/clientapi/auth/user_interactive.go index 839637351..9e0db68e0 100644 --- a/clientapi/auth/user_interactive.go +++ b/clientapi/auth/user_interactive.go @@ -78,7 +78,7 @@ func (r *Login) Username() string { if r.Identifier.Type == "m.id.user" { return r.Identifier.User } - // deprecated but without it Riot iOS won't log in + // deprecated but without it Element iOS won't log in return r.User } diff --git a/cmd/dendrite-demo-pinecone/embed/embed_riotweb.go b/cmd/dendrite-demo-pinecone/embed/embed_elementweb.go similarity index 90% rename from cmd/dendrite-demo-pinecone/embed/embed_riotweb.go rename to cmd/dendrite-demo-pinecone/embed/embed_elementweb.go index d25745ca6..4d2da55cb 100644 --- a/cmd/dendrite-demo-pinecone/embed/embed_riotweb.go +++ b/cmd/dendrite-demo-pinecone/embed/embed_elementweb.go @@ -1,4 +1,4 @@ -// +build riotweb +// +build elementweb package embed @@ -12,8 +12,8 @@ import ( "github.com/tidwall/sjson" ) -// From within the Riot Web directory: -// go run github.com/mjibson/esc -o /path/to/dendrite/internal/embed/fs_riotweb.go -private -pkg embed . +// From within the Element Web directory: +// go run github.com/mjibson/esc -o /path/to/dendrite/internal/embed/fs_elementweb.go -private -pkg embed . var cssFile = regexp.MustCompile("\\.css$") var jsFile = regexp.MustCompile("\\.js$") @@ -68,7 +68,7 @@ func Embed(rootMux *mux.Router, listenPort int, serverName string) { } js, _ := sjson.SetBytes(buf, "default_server_config.m\\.homeserver.base_url", url) js, _ = sjson.SetBytes(js, "default_server_config.m\\.homeserver.server_name", serverName) - js, _ = sjson.SetBytes(js, "brand", fmt.Sprintf("Riot %s", serverName)) + js, _ = sjson.SetBytes(js, "brand", fmt.Sprintf("Element %s", serverName)) js, _ = sjson.SetBytes(js, "disable_guests", true) js, _ = sjson.SetBytes(js, "disable_3pid_login", true) js, _ = sjson.DeleteBytes(js, "welcomeUserId") @@ -76,7 +76,7 @@ func Embed(rootMux *mux.Router, listenPort int, serverName string) { }) fmt.Println("*-------------------------------*") - fmt.Println("| This build includes Riot Web! |") + fmt.Println("| This build includes Element Web! |") fmt.Println("*-------------------------------*") fmt.Println("Point your browser to:", url) fmt.Println() diff --git a/cmd/dendrite-demo-pinecone/embed/embed_other.go b/cmd/dendrite-demo-pinecone/embed/embed_other.go index 598881148..04c2188c3 100644 --- a/cmd/dendrite-demo-pinecone/embed/embed_other.go +++ b/cmd/dendrite-demo-pinecone/embed/embed_other.go @@ -1,4 +1,4 @@ -// +build !riotweb +// +build !elementweb package embed diff --git a/cmd/dendrite-demo-yggdrasil/embed/embed_riotweb.go b/cmd/dendrite-demo-yggdrasil/embed/embed_elementweb.go similarity index 85% rename from cmd/dendrite-demo-yggdrasil/embed/embed_riotweb.go rename to cmd/dendrite-demo-yggdrasil/embed/embed_elementweb.go index 9ee4e626b..8d49c553a 100644 --- a/cmd/dendrite-demo-yggdrasil/embed/embed_riotweb.go +++ b/cmd/dendrite-demo-yggdrasil/embed/embed_elementweb.go @@ -1,4 +1,4 @@ -// +build riotweb +// +build elementweb package embed @@ -12,8 +12,8 @@ import ( "github.com/tidwall/sjson" ) -// From within the Riot Web directory: -// go run github.com/mjibson/esc -o /path/to/dendrite/internal/embed/fs_riotweb.go -private -pkg embed . +// From within the Element Web directory: +// go run github.com/mjibson/esc -o /path/to/dendrite/internal/embed/fs_elementweb.go -private -pkg embed . var cssFile = regexp.MustCompile("\\.css$") var jsFile = regexp.MustCompile("\\.js$") @@ -68,16 +68,16 @@ func Embed(rootMux *mux.Router, listenPort int, serverName string) { } js, _ := sjson.SetBytes(buf, "default_server_config.m\\.homeserver.base_url", url) js, _ = sjson.SetBytes(js, "default_server_config.m\\.homeserver.server_name", serverName) - js, _ = sjson.SetBytes(js, "brand", fmt.Sprintf("Riot %s", serverName)) + js, _ = sjson.SetBytes(js, "brand", fmt.Sprintf("Element %s", serverName)) js, _ = sjson.SetBytes(js, "disable_guests", true) js, _ = sjson.SetBytes(js, "disable_3pid_login", true) js, _ = sjson.DeleteBytes(js, "welcomeUserId") _, _ = w.Write(js) }) - fmt.Println("*-------------------------------*") - fmt.Println("| This build includes Riot Web! |") - fmt.Println("*-------------------------------*") + fmt.Println("*----------------------------------*") + fmt.Println("| This build includes Element Web! |") + fmt.Println("*----------------------------------*") fmt.Println("Point your browser to:", url) fmt.Println() } diff --git a/cmd/dendrite-demo-yggdrasil/embed/embed_other.go b/cmd/dendrite-demo-yggdrasil/embed/embed_other.go index 598881148..04c2188c3 100644 --- a/cmd/dendrite-demo-yggdrasil/embed/embed_other.go +++ b/cmd/dendrite-demo-yggdrasil/embed/embed_other.go @@ -1,4 +1,4 @@ -// +build !riotweb +// +build !elementweb package embed diff --git a/syncapi/routing/messages.go b/syncapi/routing/messages.go index 2ef25e032..9bb8c6d24 100644 --- a/syncapi/routing/messages.go +++ b/syncapi/routing/messages.go @@ -393,7 +393,7 @@ func (r *messagesReq) getStartEnd(events []*gomatrixserverlib.HeaderedEvent) (st start = *r.from if events[len(events)-1].Type() == gomatrixserverlib.MRoomCreate { // NOTSPEC: We've hit the beginning of the room so there's really nowhere - // else to go. This seems to fix Riot iOS from looping on /messages endlessly. + // else to go. This seems to fix Element iOS from looping on /messages endlessly. end = types.TopologyToken{} } else { end, err = r.db.EventPositionInTopology(