0
0
Fork 0
mirror of https://github.com/matrix-org/dendrite synced 2024-10-31 21:19:04 +01:00

Rename Riot to Element (#1874)

* s/riot/element/g

Signed-off-by: Till Faelligen <tfaelligen@gmail.com>

* fix formatting

Co-authored-by: kegsay <kegan@matrix.org>
Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
This commit is contained in:
S7evinK 2021-07-20 10:45:40 +02:00 committed by GitHub
parent 8d8fe485b4
commit da2023ba04
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 16 additions and 16 deletions

View file

@ -78,7 +78,7 @@ func (r *Login) Username() string {
if r.Identifier.Type == "m.id.user" { if r.Identifier.Type == "m.id.user" {
return r.Identifier.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 return r.User
} }

View file

@ -1,4 +1,4 @@
// +build riotweb // +build elementweb
package embed package embed
@ -12,8 +12,8 @@ import (
"github.com/tidwall/sjson" "github.com/tidwall/sjson"
) )
// From within the Riot Web directory: // From within the Element Web directory:
// go run github.com/mjibson/esc -o /path/to/dendrite/internal/embed/fs_riotweb.go -private -pkg embed . // go run github.com/mjibson/esc -o /path/to/dendrite/internal/embed/fs_elementweb.go -private -pkg embed .
var cssFile = regexp.MustCompile("\\.css$") var cssFile = regexp.MustCompile("\\.css$")
var jsFile = regexp.MustCompile("\\.js$") 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(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, "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_guests", true)
js, _ = sjson.SetBytes(js, "disable_3pid_login", true) js, _ = sjson.SetBytes(js, "disable_3pid_login", true)
js, _ = sjson.DeleteBytes(js, "welcomeUserId") js, _ = sjson.DeleteBytes(js, "welcomeUserId")
@ -76,7 +76,7 @@ func Embed(rootMux *mux.Router, listenPort int, serverName string) {
}) })
fmt.Println("*-------------------------------*") fmt.Println("*-------------------------------*")
fmt.Println("| This build includes Riot Web! |") fmt.Println("| This build includes Element Web! |")
fmt.Println("*-------------------------------*") fmt.Println("*-------------------------------*")
fmt.Println("Point your browser to:", url) fmt.Println("Point your browser to:", url)
fmt.Println() fmt.Println()

View file

@ -1,4 +1,4 @@
// +build !riotweb // +build !elementweb
package embed package embed

View file

@ -1,4 +1,4 @@
// +build riotweb // +build elementweb
package embed package embed
@ -12,8 +12,8 @@ import (
"github.com/tidwall/sjson" "github.com/tidwall/sjson"
) )
// From within the Riot Web directory: // From within the Element Web directory:
// go run github.com/mjibson/esc -o /path/to/dendrite/internal/embed/fs_riotweb.go -private -pkg embed . // go run github.com/mjibson/esc -o /path/to/dendrite/internal/embed/fs_elementweb.go -private -pkg embed .
var cssFile = regexp.MustCompile("\\.css$") var cssFile = regexp.MustCompile("\\.css$")
var jsFile = regexp.MustCompile("\\.js$") 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(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, "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_guests", true)
js, _ = sjson.SetBytes(js, "disable_3pid_login", true) js, _ = sjson.SetBytes(js, "disable_3pid_login", true)
js, _ = sjson.DeleteBytes(js, "welcomeUserId") js, _ = sjson.DeleteBytes(js, "welcomeUserId")
_, _ = w.Write(js) _, _ = w.Write(js)
}) })
fmt.Println("*-------------------------------*") fmt.Println("*----------------------------------*")
fmt.Println("| This build includes Riot Web! |") fmt.Println("| This build includes Element Web! |")
fmt.Println("*-------------------------------*") fmt.Println("*----------------------------------*")
fmt.Println("Point your browser to:", url) fmt.Println("Point your browser to:", url)
fmt.Println() fmt.Println()
} }

View file

@ -1,4 +1,4 @@
// +build !riotweb // +build !elementweb
package embed package embed

View file

@ -393,7 +393,7 @@ func (r *messagesReq) getStartEnd(events []*gomatrixserverlib.HeaderedEvent) (st
start = *r.from start = *r.from
if events[len(events)-1].Type() == gomatrixserverlib.MRoomCreate { if events[len(events)-1].Type() == gomatrixserverlib.MRoomCreate {
// NOTSPEC: We've hit the beginning of the room so there's really nowhere // 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{} end = types.TopologyToken{}
} else { } else {
end, err = r.db.EventPositionInTopology( end, err = r.db.EventPositionInTopology(