This commit is contained in:
Hoernschen 2020-10-12 16:16:28 +02:00
parent 9eac960763
commit da9196f389
22 changed files with 302 additions and 76 deletions

View file

@ -1,6 +1,6 @@
package device
import "nutfactory.org/Matrix/utils"
import "git.nutfactory.org/hoernschen/Matrix/utils"
func New(name string) (err error, device *Device) {
err, id := utils.CreateUUID()

View file

@ -4,7 +4,7 @@ import (
"fmt"
"log"
"nutfactory.org/Matrix/utils/database"
"git.nutfactory.org/hoernschen/Matrix/utils/database"
)
func CreateDevice(device *Device, userId string) (err error) {

View file

@ -5,8 +5,8 @@ import (
"fmt"
"net/http"
"nutfactory.org/Matrix/config"
"nutfactory.org/Matrix/utils"
"git.nutfactory.org/hoernschen/Matrix/config"
"git.nutfactory.org/hoernschen/Matrix/utils"
)
func InitServerSigningKey() (err error) {
@ -50,6 +50,7 @@ func GetServerSigningKeyHandler(w http.ResponseWriter, r *http.Request) {
}
}
// TODO: Use Function
func getVerifyKey(server string, id string) (key []byte, err error) {
if val, ok := config.VerifyKeys[server][id]; ok {
key = val

View file

@ -3,7 +3,7 @@ package device
import (
"fmt"
"nutfactory.org/Matrix/utils/database"
"git.nutfactory.org/hoernschen/Matrix/utils/database"
)
func CreateKey(key *Key, deviceId string) (err error) {