Skip to content

Commit

Permalink
Merge branch 'main' into johannes/msc4156
Browse files Browse the repository at this point in the history
  • Loading branch information
S7evinK authored Dec 9, 2024
2 parents 207e92a + 7cc7ebb commit f5e5396
Show file tree
Hide file tree
Showing 52 changed files with 69 additions and 66 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
env:
DOCKER_NAMESPACE: matrixdotorg
DOCKER_HUB_USER: dendritegithub
GHCR_NAMESPACE: matrix-org
GHCR_NAMESPACE: element-hq
PLATFORMS: linux/amd64,linux/arm64,linux/arm/v7

jobs:
Expand Down
15 changes: 9 additions & 6 deletions build/dendritejs-pinecone/jsServer.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,16 @@ type JSServer struct {

// OnRequestFromJS is the function that JS will invoke when there is a new request.
// The JS function signature is:
// function(reqString: string): Promise<{result: string, error: string}>
//
// function(reqString: string): Promise<{result: string, error: string}>
//
// Usage is like:
// const res = await global._go_js_server.fetch(reqString);
// if (res.error) {
// // handle error: this is a 'network' error, not a non-2xx error.
// }
// const rawHttpResponse = res.result;
//
// const res = await global._go_js_server.fetch(reqString);
// if (res.error) {
// // handle error: this is a 'network' error, not a non-2xx error.
// }
// const rawHttpResponse = res.result;
func (h *JSServer) OnRequestFromJS(this js.Value, args []js.Value) interface{} {
// we HAVE to spawn a new goroutine and return immediately or else Go will deadlock
// if this request blocks at all e.g for /sync calls
Expand Down
2 changes: 1 addition & 1 deletion clientapi/routing/admin.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import (
"strconv"
"time"

"github.com/gorilla/mux"
"github.com/element-hq/dendrite/internal"
"github.com/element-hq/dendrite/internal/eventutil"
"github.com/gorilla/mux"
"github.com/matrix-org/gomatrixserverlib"
"github.com/matrix-org/gomatrixserverlib/spec"
"github.com/matrix-org/util"
Expand Down
2 changes: 1 addition & 1 deletion clientapi/routing/membership.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import (
"net/http"
"time"

"github.com/getsentry/sentry-go"
appserviceAPI "github.com/element-hq/dendrite/appservice/api"
"github.com/element-hq/dendrite/clientapi/auth/authtypes"
"github.com/element-hq/dendrite/clientapi/httputil"
Expand All @@ -24,6 +23,7 @@ import (
"github.com/element-hq/dendrite/roomserver/types"
"github.com/element-hq/dendrite/setup/config"
userapi "github.com/element-hq/dendrite/userapi/api"
"github.com/getsentry/sentry-go"
"github.com/matrix-org/gomatrixserverlib"
"github.com/matrix-org/gomatrixserverlib/fclient"
"github.com/matrix-org/gomatrixserverlib/spec"
Expand Down
2 changes: 1 addition & 1 deletion clientapi/routing/room_hierarchy.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ import (
"strconv"
"sync"

"github.com/google/uuid"
roomserverAPI "github.com/element-hq/dendrite/roomserver/api"
"github.com/element-hq/dendrite/roomserver/types"
userapi "github.com/element-hq/dendrite/userapi/api"
"github.com/google/uuid"
"github.com/matrix-org/gomatrixserverlib/fclient"
"github.com/matrix-org/gomatrixserverlib/spec"
"github.com/matrix-org/util"
Expand Down
4 changes: 2 additions & 2 deletions cmd/dendrite-demo-pinecone/monolith/monolith.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ import (
"sync"
"time"

"github.com/gorilla/mux"
"github.com/gorilla/websocket"
"github.com/element-hq/dendrite/appservice"
"github.com/element-hq/dendrite/cmd/dendrite-demo-pinecone/conn"
"github.com/element-hq/dendrite/cmd/dendrite-demo-pinecone/embed"
Expand All @@ -43,6 +41,8 @@ import (
"github.com/element-hq/dendrite/setup/process"
"github.com/element-hq/dendrite/userapi"
userAPI "github.com/element-hq/dendrite/userapi/api"
"github.com/gorilla/mux"
"github.com/gorilla/websocket"
"github.com/matrix-org/gomatrixserverlib/spec"
"github.com/sirupsen/logrus"

Expand Down
4 changes: 2 additions & 2 deletions cmd/dendrite-demo-yggdrasil/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,14 @@ import (
"path/filepath"
"time"

"github.com/getsentry/sentry-go"
"github.com/element-hq/dendrite/internal/caching"
"github.com/element-hq/dendrite/internal/sqlutil"
"github.com/element-hq/dendrite/setup/jetstream"
"github.com/element-hq/dendrite/setup/process"
"github.com/getsentry/sentry-go"
"github.com/matrix-org/gomatrixserverlib"
"github.com/matrix-org/gomatrixserverlib/spec"

"github.com/gorilla/mux"
"github.com/element-hq/dendrite/appservice"
"github.com/element-hq/dendrite/cmd/dendrite-demo-yggdrasil/embed"
"github.com/element-hq/dendrite/cmd/dendrite-demo-yggdrasil/signing"
Expand All @@ -44,6 +43,7 @@ import (
"github.com/element-hq/dendrite/setup/mscs"
"github.com/element-hq/dendrite/test"
"github.com/element-hq/dendrite/userapi"
"github.com/gorilla/mux"
"github.com/sirupsen/logrus"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/dendrite/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ import (
"flag"
"time"

"github.com/getsentry/sentry-go"
"github.com/element-hq/dendrite/internal"
"github.com/element-hq/dendrite/internal/caching"
"github.com/element-hq/dendrite/internal/httputil"
"github.com/element-hq/dendrite/internal/sqlutil"
"github.com/element-hq/dendrite/setup/jetstream"
"github.com/element-hq/dendrite/setup/process"
"github.com/getsentry/sentry-go"
"github.com/matrix-org/gomatrixserverlib/fclient"
"github.com/prometheus/client_golang/prometheus"
"github.com/sirupsen/logrus"
Expand Down
2 changes: 1 addition & 1 deletion contrib/dendrite-demo-i2p/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ import (
"os"
"time"

"github.com/getsentry/sentry-go"
"github.com/element-hq/dendrite/internal"
"github.com/element-hq/dendrite/internal/caching"
"github.com/element-hq/dendrite/internal/httputil"
"github.com/element-hq/dendrite/internal/sqlutil"
"github.com/element-hq/dendrite/setup/jetstream"
"github.com/element-hq/dendrite/setup/process"
"github.com/getsentry/sentry-go"
"github.com/matrix-org/gomatrixserverlib/fclient"
"github.com/prometheus/client_golang/prometheus"
"github.com/sirupsen/logrus"
Expand Down
6 changes: 3 additions & 3 deletions contrib/dendrite-demo-i2p/main_i2p.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ import (
"text/template"

"github.com/cretz/bine/tor"
"github.com/element-hq/dendrite/internal"
"github.com/element-hq/dendrite/internal/httputil"
"github.com/element-hq/dendrite/setup/process"
"github.com/eyedeekay/goSam"
"github.com/eyedeekay/onramp"
sentryhttp "github.com/getsentry/sentry-go/http"
"github.com/gorilla/mux"
"github.com/kardianos/minwinsvc"
"github.com/element-hq/dendrite/internal"
"github.com/element-hq/dendrite/internal/httputil"
"github.com/element-hq/dendrite/setup/process"
"github.com/prometheus/client_golang/prometheus/promhttp"
"github.com/sirupsen/logrus"

Expand Down
2 changes: 1 addition & 1 deletion contrib/dendrite-demo-tor/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ import (
"os"
"time"

"github.com/getsentry/sentry-go"
"github.com/element-hq/dendrite/internal"
"github.com/element-hq/dendrite/internal/caching"
"github.com/element-hq/dendrite/internal/httputil"
"github.com/element-hq/dendrite/internal/sqlutil"
"github.com/element-hq/dendrite/setup/jetstream"
"github.com/element-hq/dendrite/setup/process"
"github.com/getsentry/sentry-go"
"github.com/matrix-org/gomatrixserverlib/fclient"
"github.com/prometheus/client_golang/prometheus"
"github.com/sirupsen/logrus"
Expand Down
6 changes: 3 additions & 3 deletions contrib/dendrite-demo-tor/main_tor.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ import (
"text/template"

"github.com/cretz/bine/tor"
"github.com/element-hq/dendrite/internal"
"github.com/element-hq/dendrite/internal/httputil"
"github.com/element-hq/dendrite/setup/process"
"github.com/eyedeekay/onramp"
sentryhttp "github.com/getsentry/sentry-go/http"
"github.com/gorilla/mux"
"github.com/kardianos/minwinsvc"
"github.com/element-hq/dendrite/internal"
"github.com/element-hq/dendrite/internal/httputil"
"github.com/element-hq/dendrite/setup/process"
"github.com/prometheus/client_golang/prometheus/promhttp"
"github.com/sirupsen/logrus"

Expand Down
2 changes: 1 addition & 1 deletion federationapi/consumers/receipts.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ import (
"encoding/json"
"strconv"

"github.com/getsentry/sentry-go"
"github.com/element-hq/dendrite/federationapi/queue"
"github.com/element-hq/dendrite/federationapi/storage"
fedTypes "github.com/element-hq/dendrite/federationapi/types"
"github.com/element-hq/dendrite/setup/config"
"github.com/element-hq/dendrite/setup/jetstream"
"github.com/element-hq/dendrite/setup/process"
syncTypes "github.com/element-hq/dendrite/syncapi/types"
"github.com/getsentry/sentry-go"
"github.com/matrix-org/gomatrixserverlib"
"github.com/matrix-org/gomatrixserverlib/spec"
"github.com/nats-io/nats.go"
Expand Down
2 changes: 1 addition & 1 deletion federationapi/routing/profile_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import (
"net/url"
"testing"

"github.com/gorilla/mux"
"github.com/element-hq/dendrite/clientapi/auth/authtypes"
"github.com/element-hq/dendrite/cmd/dendrite-demo-yggdrasil/signing"
fedAPI "github.com/element-hq/dendrite/federationapi"
Expand All @@ -26,6 +25,7 @@ import (
"github.com/element-hq/dendrite/test"
"github.com/element-hq/dendrite/test/testrig"
userAPI "github.com/element-hq/dendrite/userapi/api"
"github.com/gorilla/mux"
"github.com/matrix-org/gomatrixserverlib"
"github.com/matrix-org/gomatrixserverlib/fclient"
"github.com/matrix-org/gomatrixserverlib/spec"
Expand Down
2 changes: 1 addition & 1 deletion federationapi/routing/query_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import (
"net/url"
"testing"

"github.com/gorilla/mux"
"github.com/element-hq/dendrite/cmd/dendrite-demo-yggdrasil/signing"
fedAPI "github.com/element-hq/dendrite/federationapi"
"github.com/element-hq/dendrite/federationapi/routing"
Expand All @@ -24,6 +23,7 @@ import (
"github.com/element-hq/dendrite/setup/jetstream"
"github.com/element-hq/dendrite/test"
"github.com/element-hq/dendrite/test/testrig"
"github.com/gorilla/mux"
"github.com/matrix-org/gomatrixserverlib"
"github.com/matrix-org/gomatrixserverlib/fclient"
"github.com/matrix-org/gomatrixserverlib/spec"
Expand Down
4 changes: 2 additions & 2 deletions federationapi/routing/routing.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ import (
"sync"
"time"

"github.com/getsentry/sentry-go"
"github.com/gorilla/mux"
fedInternal "github.com/element-hq/dendrite/federationapi/internal"
"github.com/element-hq/dendrite/federationapi/producers"
"github.com/element-hq/dendrite/internal"
Expand All @@ -24,6 +22,8 @@ import (
roomserverAPI "github.com/element-hq/dendrite/roomserver/api"
"github.com/element-hq/dendrite/setup/config"
userapi "github.com/element-hq/dendrite/userapi/api"
"github.com/getsentry/sentry-go"
"github.com/gorilla/mux"
"github.com/matrix-org/gomatrixserverlib"
"github.com/matrix-org/gomatrixserverlib/fclient"
"github.com/matrix-org/gomatrixserverlib/spec"
Expand Down
2 changes: 1 addition & 1 deletion federationapi/routing/send_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import (
"net/http/httptest"
"testing"

"github.com/gorilla/mux"
"github.com/element-hq/dendrite/cmd/dendrite-demo-yggdrasil/signing"
fedAPI "github.com/element-hq/dendrite/federationapi"
"github.com/element-hq/dendrite/federationapi/routing"
Expand All @@ -22,6 +21,7 @@ import (
"github.com/element-hq/dendrite/setup/jetstream"
"github.com/element-hq/dendrite/test"
"github.com/element-hq/dendrite/test/testrig"
"github.com/gorilla/mux"
"github.com/matrix-org/gomatrixserverlib"
"github.com/matrix-org/gomatrixserverlib/fclient"
"github.com/matrix-org/gomatrixserverlib/spec"
Expand Down
2 changes: 1 addition & 1 deletion federationapi/storage/postgres/joined_hosts_table.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ import (
"context"
"database/sql"

"github.com/lib/pq"
"github.com/element-hq/dendrite/federationapi/types"
"github.com/element-hq/dendrite/internal"
"github.com/element-hq/dendrite/internal/sqlutil"
"github.com/lib/pq"
"github.com/matrix-org/gomatrixserverlib/spec"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ import (
"database/sql"
"encoding/json"

"github.com/lib/pq"
"github.com/element-hq/dendrite/federationapi/storage/tables"
"github.com/element-hq/dendrite/internal"
"github.com/element-hq/dendrite/internal/sqlutil"
"github.com/lib/pq"
"github.com/matrix-org/gomatrixserverlib"
"github.com/matrix-org/gomatrixserverlib/spec"
)
Expand Down
2 changes: 1 addition & 1 deletion federationapi/storage/postgres/queue_json_table.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import (
"context"
"database/sql"

"github.com/lib/pq"
"github.com/element-hq/dendrite/internal"
"github.com/element-hq/dendrite/internal/sqlutil"
"github.com/lib/pq"
)

const queueJSONSchema = `
Expand Down
2 changes: 1 addition & 1 deletion federationapi/storage/postgres/queue_pdus_table.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import (
"context"
"database/sql"

"github.com/lib/pq"
"github.com/element-hq/dendrite/internal"
"github.com/element-hq/dendrite/internal/sqlutil"
"github.com/lib/pq"
"github.com/matrix-org/gomatrixserverlib"
"github.com/matrix-org/gomatrixserverlib/spec"
)
Expand Down
2 changes: 1 addition & 1 deletion federationapi/storage/postgres/relay_servers_table.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import (
"context"
"database/sql"

"github.com/lib/pq"
"github.com/element-hq/dendrite/internal"
"github.com/element-hq/dendrite/internal/sqlutil"
"github.com/lib/pq"
"github.com/matrix-org/gomatrixserverlib/spec"
)

Expand Down
2 changes: 1 addition & 1 deletion federationapi/storage/postgres/server_key_table.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import (
"context"
"database/sql"

"github.com/lib/pq"
"github.com/element-hq/dendrite/internal"
"github.com/element-hq/dendrite/internal/sqlutil"
"github.com/lib/pq"
"github.com/matrix-org/gomatrixserverlib"
"github.com/matrix-org/gomatrixserverlib/spec"
)
Expand Down
2 changes: 1 addition & 1 deletion internal/transactionrequest.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ import (
"fmt"
"sync"

"github.com/getsentry/sentry-go"
"github.com/element-hq/dendrite/federationapi/producers"
"github.com/element-hq/dendrite/federationapi/types"
"github.com/element-hq/dendrite/roomserver/api"
rstypes "github.com/element-hq/dendrite/roomserver/types"
syncTypes "github.com/element-hq/dendrite/syncapi/types"
userAPI "github.com/element-hq/dendrite/userapi/api"
"github.com/getsentry/sentry-go"
"github.com/matrix-org/gomatrixserverlib"
"github.com/matrix-org/gomatrixserverlib/fclient"
"github.com/matrix-org/gomatrixserverlib/spec"
Expand Down
2 changes: 1 addition & 1 deletion mediaapi/routing/routing.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ import (
"net/http"
"strings"

"github.com/gorilla/mux"
"github.com/element-hq/dendrite/federationapi/routing"
"github.com/element-hq/dendrite/internal/httputil"
"github.com/element-hq/dendrite/mediaapi/storage"
"github.com/element-hq/dendrite/mediaapi/types"
"github.com/element-hq/dendrite/setup/config"
userapi "github.com/element-hq/dendrite/userapi/api"
"github.com/gorilla/mux"
"github.com/matrix-org/gomatrixserverlib"
"github.com/matrix-org/gomatrixserverlib/fclient"
"github.com/matrix-org/gomatrixserverlib/spec"
Expand Down
2 changes: 1 addition & 1 deletion mediaapi/storage/postgres/mediaapi.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ package postgres

import (
// Import the postgres database driver.
_ "github.com/lib/pq"
"github.com/element-hq/dendrite/internal/sqlutil"
"github.com/element-hq/dendrite/mediaapi/storage/shared"
"github.com/element-hq/dendrite/setup/config"
_ "github.com/lib/pq"
)

// NewDatabase opens a postgres database.
Expand Down
Loading

0 comments on commit f5e5396

Please sign in to comment.