Notifications with new Flutter app [Kinda work!]
This commit is contained in:
@@ -5,7 +5,7 @@ package models
|
||||
import "gogs.mikescher.com/BlackForestBytes/goext/langext"
|
||||
import "gogs.mikescher.com/BlackForestBytes/goext/enums"
|
||||
|
||||
const ChecksumEnumGenerator = "08404cad6879118878e2b64db01bb6bf54cda9d51e3d3ff91b239e9a8459fecd" // GoExtVersion: 0.0.463
|
||||
const ChecksumEnumGenerator = "5b115c5f107801af608630d2c5adce57cd4b050d176c8cd3db5c132020bf153c" // GoExtVersion: 0.0.463
|
||||
|
||||
// ================================ ClientType ================================
|
||||
//
|
||||
|
@@ -15,7 +15,7 @@ import "reflect"
|
||||
import "regexp"
|
||||
import "strings"
|
||||
|
||||
const ChecksumCharsetIDGenerator = "08404cad6879118878e2b64db01bb6bf54cda9d51e3d3ff91b239e9a8459fecd" // GoExtVersion: 0.0.463
|
||||
const ChecksumCharsetIDGenerator = "5b115c5f107801af608630d2c5adce57cd4b050d176c8cd3db5c132020bf153c" // GoExtVersion: 0.0.463
|
||||
|
||||
const idlen = 24
|
||||
|
||||
|
@@ -2,6 +2,7 @@ package models
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"github.com/jmoiron/sqlx"
|
||||
"gogs.mikescher.com/BlackForestBytes/goext/langext"
|
||||
"gogs.mikescher.com/BlackForestBytes/goext/sq"
|
||||
@@ -94,6 +95,14 @@ func (m Message) ShortContent() string {
|
||||
return (*m.Content)[0:ContentLengthShort-3] + "..."
|
||||
}
|
||||
|
||||
func (m Message) FormatNotificationTitle(user User, channel Channel) string {
|
||||
if m.ChannelInternalName == user.DefaultChannel() {
|
||||
return m.Title
|
||||
}
|
||||
|
||||
return fmt.Sprintf("[%s] %s", channel.DisplayName, m.Title)
|
||||
}
|
||||
|
||||
type MessageJSON struct {
|
||||
MessageID MessageID `json:"message_id"`
|
||||
SenderUserID UserID `json:"sender_user_id"`
|
||||
|
Reference in New Issue
Block a user