mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-07-31 13:22:46 +00:00
PDU Sender split (#3100)
Initial cut of splitting PDU Sender into SenderID & looking up UserID where required.
This commit is contained in:
parent
725ff5567d
commit
7a1fd7f512
66 changed files with 580 additions and 189 deletions
|
@ -11,6 +11,7 @@ import (
|
|||
"github.com/matrix-org/dendrite/internal/sqlutil"
|
||||
"github.com/matrix-org/dendrite/syncapi/synctypes"
|
||||
"github.com/matrix-org/gomatrixserverlib"
|
||||
"github.com/matrix-org/gomatrixserverlib/spec"
|
||||
"github.com/matrix-org/util"
|
||||
"golang.org/x/crypto/bcrypt"
|
||||
|
||||
|
@ -87,7 +88,7 @@ func TestNotifyUserCountsAsync(t *testing.T) {
|
|||
}
|
||||
|
||||
// Prepare pusher with our test server URL
|
||||
if err := db.UpsertPusher(ctx, api.Pusher{
|
||||
if err = db.UpsertPusher(ctx, api.Pusher{
|
||||
Kind: api.HTTPKind,
|
||||
AppID: appID,
|
||||
PushKey: pushKey,
|
||||
|
@ -99,8 +100,12 @@ func TestNotifyUserCountsAsync(t *testing.T) {
|
|||
}
|
||||
|
||||
// Insert a dummy event
|
||||
sender, err := spec.NewUserID(alice.ID, true)
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
if err := db.InsertNotification(ctx, aliceLocalpart, serverName, dummyEvent.EventID(), 0, nil, &api.Notification{
|
||||
Event: synctypes.ToClientEvent(dummyEvent, synctypes.FormatAll),
|
||||
Event: synctypes.ToClientEvent(dummyEvent, synctypes.FormatAll, *sender),
|
||||
}); err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue