add logtr.sosf for sos straight to specific matrix
This commit is contained in:
@@ -16,7 +16,7 @@ func TestImageUpload(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if err := config.Refresh(); err != nil {
|
||||
if err := config.Refresh(nil); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
got, err := UploadImage(b)
|
||||
|
||||
@@ -23,15 +23,24 @@ type Matrix struct {
|
||||
continuation string
|
||||
}
|
||||
|
||||
func NewSOSMatrix() logtr.SOSer {
|
||||
conf := config.Get().Log.SOSMatrix
|
||||
return newMatrix(conf, "0")
|
||||
}
|
||||
|
||||
func NewMatrix() Matrix {
|
||||
conf := config.Get().Message.Matrix
|
||||
return newMatrix(conf, GetMatrixContinuation())
|
||||
}
|
||||
|
||||
func newMatrix(conf config.Matrix, cont string) Matrix {
|
||||
return Matrix{
|
||||
homeserver: conf.Homeserver,
|
||||
username: conf.Username,
|
||||
token: conf.Token,
|
||||
room: conf.Room,
|
||||
mock: conf.Mock,
|
||||
continuation: GetMatrixContinuation(),
|
||||
continuation: cont,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user