diff options
Diffstat (limited to 'appservice/names.go')
-rw-r--r-- | appservice/names.go | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/appservice/names.go b/appservice/names.go deleted file mode 100644 index 9ed00f8..0000000 --- a/appservice/names.go +++ /dev/null @@ -1,23 +0,0 @@ -package appservice - -import ( - "fmt" - "strings" - - . "git.deuxfleurs.fr/Deuxfleurs/easybridge/connector" -) - -func roomAlias(protocol string, id RoomID) string { - return fmt.Sprintf("_ezbr__%s__%s", safeStringForId(string(id)), protocol) -} - -func userMxId(protocol string, id UserID) string { - return fmt.Sprintf("_ezbr__%s__%s", safeStringForId(string(id)), protocol) -} - -func safeStringForId(in string) string { - id2 := strings.ReplaceAll(in, "#", "") - id2 = strings.ReplaceAll(id2, "@", "__") - id2 = strings.ReplaceAll(id2, ":", "_") - return id2 -} |