Notifications with new Flutter app [Kinda work!]
All checks were successful
Build Docker and Deploy / Build Docker Container (push) Successful in 1m56s
Build Docker and Deploy / Deploy to Server (push) Successful in 5s

This commit is contained in:
2024-06-01 15:37:59 +02:00
parent 0560330f68
commit e397f009b9
19 changed files with 198 additions and 551 deletions

View File

@@ -8,10 +8,8 @@ import (
)
type SinkData struct {
Message models.Message
Client models.Client
CompatTitleOverride *string
CompatMsgIDOverride *string
Message models.Message
Client models.Client
}
type TestSink struct {
@@ -26,7 +24,7 @@ func (d *TestSink) Last() SinkData {
return d.Data[len(d.Data)-1]
}
func (d *TestSink) SendNotification(ctx context.Context, client models.Client, msg models.Message, compatTitleOverride *string, compatMsgIDOverride *string) (string, error) {
func (d *TestSink) SendNotification(ctx context.Context, user models.User, client models.Client, channel models.Channel, msg models.Message) (string, error) {
id, err := langext.NewHexUUID()
if err != nil {
return "", err
@@ -35,10 +33,8 @@ func (d *TestSink) SendNotification(ctx context.Context, client models.Client, m
key := "TestSink[" + id + "]"
d.Data = append(d.Data, SinkData{
Message: msg,
Client: client,
CompatTitleOverride: compatTitleOverride,
CompatMsgIDOverride: compatMsgIDOverride,
Message: msg,
Client: client,
})
return key, nil