Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ require (
firebase.google.com/go/v4 v4.8.0
github.com/aws/aws-sdk-go-v2 v0.17.0
github.com/bits-and-blooms/bloom/v3 v3.1.0
github.com/code-payments/code-protobuf-api v1.16.6
github.com/code-payments/code-protobuf-api v1.19.0
github.com/dghubble/oauth1 v0.7.3
github.com/emirpasic/gods v1.12.0
github.com/envoyproxy/protoc-gen-validate v1.0.4
github.com/golang-jwt/jwt/v5 v5.0.0
Expand Down Expand Up @@ -65,7 +66,6 @@ require (
github.com/coreos/go-semver v0.3.0 // indirect
github.com/coreos/go-systemd/v22 v22.3.2 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/dghubble/oauth1 v0.7.3 // indirect
github.com/docker/cli v20.10.7+incompatible // indirect
github.com/docker/docker v20.10.7+incompatible // indirect
github.com/docker/go-connections v0.4.0 // indirect
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWH
github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
github.com/cockroachdb/apd v1.1.0 h1:3LFP3629v+1aKXU5Q37mxmRxX/pIu1nijXydLShEq5I=
github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ=
github.com/code-payments/code-protobuf-api v1.16.6 h1:QCot0U+4Ar5SdSX4v955FORMsd3Qcf0ZgkoqlGJZzu0=
github.com/code-payments/code-protobuf-api v1.16.6/go.mod h1:pHQm75vydD6Cm2qHAzlimW6drysm489Z4tVxC2zHSsU=
github.com/code-payments/code-protobuf-api v1.19.0 h1:md/eJhqltz8dDY0U8hwT/42C3h+kP+W/68D7RMSjqPo=
github.com/code-payments/code-protobuf-api v1.19.0/go.mod h1:pHQm75vydD6Cm2qHAzlimW6drysm489Z4tVxC2zHSsU=
github.com/containerd/continuity v0.0.0-20190827140505-75bee3e2ccb6 h1:NmTXa/uVnDyp0TY5MKi197+3HWcnYWfnHGyaFthlnGw=
github.com/containerd/continuity v0.0.0-20190827140505-75bee3e2ccb6/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y=
github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk=
Expand Down
4 changes: 2 additions & 2 deletions pkg/code/chat/message_code_team.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ func newIncentiveMessage(localizedTextKey string, intentRecord *intent.Record) (

content := []*chatpb.Content{
{
Type: &chatpb.Content_Localized{
Localized: &chatpb.LocalizedContent{
Type: &chatpb.Content_ServerLocalized{
ServerLocalized: &chatpb.ServerLocalizedContent{
KeyOrText: localizedTextKey,
},
},
Expand Down
12 changes: 6 additions & 6 deletions pkg/code/chat/message_kin_purchases.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ func SendKinPurchasesMessage(ctx context.Context, data code_data.Provider, recei
func ToUsdcDepositedMessage(signature string, ts time.Time) (*chatpb.ChatMessage, error) {
content := []*chatpb.Content{
{
Type: &chatpb.Content_Localized{
Localized: &chatpb.LocalizedContent{
Type: &chatpb.Content_ServerLocalized{
ServerLocalized: &chatpb.ServerLocalizedContent{
KeyOrText: localization.ChatMessageUsdcDeposited,
},
},
Expand All @@ -60,8 +60,8 @@ func NewUsdcBeingConvertedMessage(ts time.Time) (*chatpb.ChatMessage, error) {

content := []*chatpb.Content{
{
Type: &chatpb.Content_Localized{
Localized: &chatpb.LocalizedContent{
Type: &chatpb.Content_ServerLocalized{
ServerLocalized: &chatpb.ServerLocalizedContent{
KeyOrText: localization.ChatMessageUsdcBeingConverted,
},
},
Expand All @@ -79,8 +79,8 @@ func ToKinAvailableForUseMessage(signature string, ts time.Time, purchases ...*t

content := []*chatpb.Content{
{
Type: &chatpb.Content_Localized{
Localized: &chatpb.LocalizedContent{
Type: &chatpb.Content_ServerLocalized{
ServerLocalized: &chatpb.ServerLocalizedContent{
KeyOrText: localization.ChatMessageKinAvailableForUse,
},
},
Expand Down
4 changes: 2 additions & 2 deletions pkg/code/chat/sender_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,8 @@ func newRandomChatMessage(t *testing.T, contentLength int) *chatpb.ChatMessage {
var content []*chatpb.Content
for i := 0; i < contentLength; i++ {
content = append(content, &chatpb.Content{
Type: &chatpb.Content_Localized{
Localized: &chatpb.LocalizedContent{
Type: &chatpb.Content_ServerLocalized{
ServerLocalized: &chatpb.ServerLocalizedContent{
KeyOrText: fmt.Sprintf("key%d", rand.Uint32()),
},
},
Expand Down
16 changes: 16 additions & 0 deletions pkg/code/data/intent/intent.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,13 @@ type SendPrivatePaymentMetadata struct {
IsRemoteSend bool
IsMicroPayment bool
IsTip bool
IsChat bool

// Set when IsTip = true
TipMetadata *TipMetadata

// Set when IsChat = true
ChatId string
}

type TipMetadata struct {
Expand Down Expand Up @@ -578,8 +582,10 @@ func (m *SendPrivatePaymentMetadata) Clone() SendPrivatePaymentMetadata {
IsRemoteSend: m.IsRemoteSend,
IsMicroPayment: m.IsMicroPayment,
IsTip: m.IsTip,
IsChat: m.IsChat,

TipMetadata: tipMetadata,
ChatId: m.ChatId,
}
}

Expand All @@ -605,8 +611,10 @@ func (m *SendPrivatePaymentMetadata) CopyTo(dst *SendPrivatePaymentMetadata) {
dst.IsRemoteSend = m.IsRemoteSend
dst.IsMicroPayment = m.IsMicroPayment
dst.IsTip = m.IsTip
dst.IsChat = m.IsChat

dst.TipMetadata = tipMetadata
dst.ChatId = m.ChatId
}

func (m *SendPrivatePaymentMetadata) Validate() error {
Expand Down Expand Up @@ -650,6 +658,14 @@ func (m *SendPrivatePaymentMetadata) Validate() error {
return errors.New("tip metadata can only be set for tips")
}

if m.IsChat {
if len(m.ChatId) == 0 {
return errors.New("chat_id required for chat")
}
} else if m.ChatId != "" {
return errors.New("chat_id can only be set for chats")
}

return nil
}

Expand Down
38 changes: 28 additions & 10 deletions pkg/code/data/intent/postgres/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ type intentModel struct {
IsTip bool `db:"is_tip"`
TipPlatform sql.NullInt16 `db:"tip_platform"`
TippedUsername sql.NullString `db:"tipped_username"`
IsChat bool `db:"is_chat"`
ChatId sql.NullString `db:"chat_id"`
RelationshipTo sql.NullString `db:"relationship_to"`
InitiatorPhoneNumber sql.NullString `db:"phone_number"` // todo: rename the DB field to initiator_phone_number
State uint `db:"state"`
Expand Down Expand Up @@ -106,6 +108,7 @@ func toIntentModel(obj *intent.Record) (*intentModel, error) {
m.IsRemoteSend = obj.SendPrivatePaymentMetadata.IsRemoteSend
m.IsMicroPayment = obj.SendPrivatePaymentMetadata.IsMicroPayment
m.IsTip = obj.SendPrivatePaymentMetadata.IsTip
m.IsChat = obj.SendPrivatePaymentMetadata.IsChat

if m.IsTip {
m.TipPlatform = sql.NullInt16{
Expand All @@ -117,6 +120,13 @@ func toIntentModel(obj *intent.Record) (*intentModel, error) {
String: obj.SendPrivatePaymentMetadata.TipMetadata.Username,
}
}

if m.IsChat {
m.ChatId = sql.NullString{
Valid: true,
String: obj.SendPrivatePaymentMetadata.ChatId,
}
}
case intent.ReceivePaymentsPrivately:
m.Source = obj.ReceivePaymentsPrivatelyMetadata.Source
m.Quantity = obj.ReceivePaymentsPrivatelyMetadata.Quantity
Expand Down Expand Up @@ -224,6 +234,7 @@ func fromIntentModel(obj *intentModel) *intent.Record {
IsRemoteSend: obj.IsRemoteSend,
IsMicroPayment: obj.IsMicroPayment,
IsTip: obj.IsTip,
IsChat: obj.IsChat,
}

if record.SendPrivatePaymentMetadata.IsTip {
Expand All @@ -232,6 +243,11 @@ func fromIntentModel(obj *intentModel) *intent.Record {
Username: obj.TippedUsername.String,
}
}

if record.SendPrivatePaymentMetadata.IsChat {
record.SendPrivatePaymentMetadata.ChatId = obj.ChatId.String
}

case intent.ReceivePaymentsPrivately:
record.ReceivePaymentsPrivatelyMetadata = &intent.ReceivePaymentsPrivatelyMetadata{
Source: obj.Source,
Expand Down Expand Up @@ -300,16 +316,16 @@ func fromIntentModel(obj *intentModel) *intent.Record {
func (m *intentModel) dbSave(ctx context.Context, db *sqlx.DB) error {
return pgutil.ExecuteInTx(ctx, db, sql.LevelDefault, func(tx *sqlx.Tx) error {
query := `INSERT INTO ` + intentTableName + `
(intent_id, intent_type, owner, source, destination_owner, destination, quantity, treasury_pool, recent_root, exchange_currency, exchange_rate, native_amount, usd_market_value, is_withdraw, is_deposit, is_remote_send, is_returned, is_issuer_voiding_gift_card, is_micro_payment, is_tip, relationship_to, tip_platform, tipped_username, phone_number, state, created_at)
VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26)
(intent_id, intent_type, owner, source, destination_owner, destination, quantity, treasury_pool, recent_root, exchange_currency, exchange_rate, native_amount, usd_market_value, is_withdraw, is_deposit, is_remote_send, is_returned, is_issuer_voiding_gift_card, is_micro_payment, is_tip, is_chat, relationship_to, tip_platform, tipped_username, chat_id, phone_number, state, created_at)
VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28)

ON CONFLICT (intent_id)
DO UPDATE
SET state = $25
SET state = $27
WHERE ` + intentTableName + `.intent_id = $1

RETURNING
id, intent_id, intent_type, source, destination_owner, destination, quantity, treasury_pool, recent_root, exchange_currency, exchange_rate, native_amount, usd_market_value, is_withdraw, is_deposit, is_remote_send, is_returned, is_issuer_voiding_gift_card, is_micro_payment, is_tip, relationship_to, tip_platform, tipped_username, phone_number, state, created_at`
id, intent_id, intent_type, source, destination_owner, destination, quantity, treasury_pool, recent_root, exchange_currency, exchange_rate, native_amount, usd_market_value, is_withdraw, is_deposit, is_remote_send, is_returned, is_issuer_voiding_gift_card, is_micro_payment, is_tip, is_chat, relationship_to, tip_platform, tipped_username, chat_id, phone_number, state, created_at`

err := tx.QueryRowxContext(
ctx,
Expand All @@ -334,9 +350,11 @@ func (m *intentModel) dbSave(ctx context.Context, db *sqlx.DB) error {
m.IsIssuerVoidingGiftCard,
m.IsMicroPayment,
m.IsTip,
m.IsChat,
m.RelationshipTo,
m.TipPlatform,
m.TippedUsername,
m.ChatId,
m.InitiatorPhoneNumber,
m.State,
m.CreatedAt,
Expand All @@ -349,7 +367,7 @@ func (m *intentModel) dbSave(ctx context.Context, db *sqlx.DB) error {
func dbGetIntent(ctx context.Context, db *sqlx.DB, intentID string) (*intentModel, error) {
res := &intentModel{}

query := `SELECT id, intent_id, intent_type, owner, source, destination_owner, destination, quantity, treasury_pool, recent_root, exchange_currency, exchange_rate, native_amount, usd_market_value, is_withdraw, is_deposit, is_remote_send, is_returned, is_issuer_voiding_gift_card, is_micro_payment, is_tip, relationship_to, tip_platform, tipped_username, phone_number, state, created_at
query := `SELECT id, intent_id, intent_type, owner, source, destination_owner, destination, quantity, treasury_pool, recent_root, exchange_currency, exchange_rate, native_amount, usd_market_value, is_withdraw, is_deposit, is_remote_send, is_returned, is_issuer_voiding_gift_card, is_micro_payment, is_tip, is_chat, relationship_to, tip_platform, tipped_username, chat_id, phone_number, state, created_at
FROM ` + intentTableName + `
WHERE intent_id = $1
LIMIT 1`
Expand All @@ -364,7 +382,7 @@ func dbGetIntent(ctx context.Context, db *sqlx.DB, intentID string) (*intentMode
func dbGetLatestByInitiatorAndType(ctx context.Context, db *sqlx.DB, intentType intent.Type, owner string) (*intentModel, error) {
res := &intentModel{}

query := `SELECT id, intent_id, intent_type, owner, source, destination_owner, destination, quantity, treasury_pool, recent_root, exchange_currency, exchange_rate, native_amount, usd_market_value, is_withdraw, is_deposit, is_remote_send, is_returned, is_issuer_voiding_gift_card, is_micro_payment, is_tip, relationship_to, tip_platform, tipped_username, phone_number, state, created_at
query := `SELECT id, intent_id, intent_type, owner, source, destination_owner, destination, quantity, treasury_pool, recent_root, exchange_currency, exchange_rate, native_amount, usd_market_value, is_withdraw, is_deposit, is_remote_send, is_returned, is_issuer_voiding_gift_card, is_micro_payment, is_tip, is_chat, relationship_to, tip_platform, tipped_username, chat_id, phone_number, state, created_at
FROM ` + intentTableName + `
WHERE owner = $1 AND intent_type = $2
ORDER BY created_at DESC
Expand All @@ -381,7 +399,7 @@ func dbGetLatestByInitiatorAndType(ctx context.Context, db *sqlx.DB, intentType
func dbGetAllByOwner(ctx context.Context, db *sqlx.DB, owner string, cursor q.Cursor, limit uint64, direction q.Ordering) ([]*intentModel, error) {
res := []*intentModel{}

query := `SELECT id, intent_id, intent_type, owner, source, destination_owner, destination, quantity, treasury_pool, recent_root, exchange_currency, exchange_rate, native_amount, usd_market_value, is_withdraw, is_deposit, is_remote_send, is_returned, is_issuer_voiding_gift_card, is_micro_payment, is_tip, relationship_to, tip_platform, tipped_username, phone_number, state, created_at
query := `SELECT id, intent_id, intent_type, owner, source, destination_owner, destination, quantity, treasury_pool, recent_root, exchange_currency, exchange_rate, native_amount, usd_market_value, is_withdraw, is_deposit, is_remote_send, is_returned, is_issuer_voiding_gift_card, is_micro_payment, is_tip, is_chat, relationship_to, tip_platform, tipped_username, chat_id, phone_number, state, created_at
FROM ` + intentTableName + `
WHERE (owner = $1 OR destination_owner = $1) AND (intent_type != $2 AND intent_type != $3)
`
Expand Down Expand Up @@ -542,7 +560,7 @@ func dbGetNetBalanceFromPrePrivacy2022Intents(ctx context.Context, db *sqlx.DB,
func dbGetLatestSaveRecentRootIntentForTreasury(ctx context.Context, db *sqlx.DB, treasury string) (*intentModel, error) {
res := &intentModel{}

query := `SELECT id, intent_id, intent_type, owner, source, destination_owner, destination, quantity, treasury_pool, recent_root, exchange_currency, exchange_rate, native_amount, usd_market_value, is_withdraw, is_deposit, is_remote_send, is_returned, is_issuer_voiding_gift_card, is_micro_payment, is_tip, relationship_to, tip_platform, tipped_username, phone_number, state, created_at
query := `SELECT id, intent_id, intent_type, owner, source, destination_owner, destination, quantity, treasury_pool, recent_root, exchange_currency, exchange_rate, native_amount, usd_market_value, is_withdraw, is_deposit, is_remote_send, is_returned, is_issuer_voiding_gift_card, is_micro_payment, is_tip, is_chat, relationship_to, tip_platform, tipped_username, chat_id, phone_number, state, created_at
FROM ` + intentTableName + `
WHERE treasury_pool = $1 and intent_type = $2
ORDER BY id DESC
Expand All @@ -559,7 +577,7 @@ func dbGetLatestSaveRecentRootIntentForTreasury(ctx context.Context, db *sqlx.DB
func dbGetOriginalGiftCardIssuedIntent(ctx context.Context, db *sqlx.DB, giftCardVault string) (*intentModel, error) {
res := []*intentModel{}

query := `SELECT id, intent_id, intent_type, owner, source, destination_owner, destination, quantity, treasury_pool, recent_root, exchange_currency, exchange_rate, native_amount, usd_market_value, is_withdraw, is_deposit, is_remote_send, is_returned, is_issuer_voiding_gift_card, is_micro_payment, is_tip, relationship_to, tip_platform, tipped_username, phone_number, state, created_at
query := `SELECT id, intent_id, intent_type, owner, source, destination_owner, destination, quantity, treasury_pool, recent_root, exchange_currency, exchange_rate, native_amount, usd_market_value, is_withdraw, is_deposit, is_remote_send, is_returned, is_issuer_voiding_gift_card, is_micro_payment, is_tip, is_chat, relationship_to, tip_platform, tipped_username, chat_id, phone_number, state, created_at
FROM ` + intentTableName + `
WHERE destination = $1 and intent_type = $2 AND state != $3 AND is_remote_send IS TRUE
LIMIT 2
Expand Down Expand Up @@ -591,7 +609,7 @@ func dbGetOriginalGiftCardIssuedIntent(ctx context.Context, db *sqlx.DB, giftCar
func dbGetGiftCardClaimedIntent(ctx context.Context, db *sqlx.DB, giftCardVault string) (*intentModel, error) {
res := []*intentModel{}

query := `SELECT id, intent_id, intent_type, owner, source, destination_owner, destination, quantity, treasury_pool, recent_root, exchange_currency, exchange_rate, native_amount, usd_market_value, is_withdraw, is_deposit, is_remote_send, is_returned, is_issuer_voiding_gift_card, is_micro_payment, is_tip, relationship_to, tip_platform, tipped_username, phone_number, state, created_at
query := `SELECT id, intent_id, intent_type, owner, source, destination_owner, destination, quantity, treasury_pool, recent_root, exchange_currency, exchange_rate, native_amount, usd_market_value, is_withdraw, is_deposit, is_remote_send, is_returned, is_issuer_voiding_gift_card, is_micro_payment, is_tip, is_chat, relationship_to, tip_platform, tipped_username, chat_id, phone_number, state, created_at
FROM ` + intentTableName + `
WHERE source = $1 and intent_type = $2 AND state != $3 AND is_remote_send IS TRUE
LIMIT 2
Expand Down
4 changes: 3 additions & 1 deletion pkg/code/data/intent/postgres/store_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,15 @@ const (
is_issuer_voiding_gift_card BOOL NOT NULL,
is_micro_payment BOOL NOT NULL,
is_tip BOOL NOT NULL,
is_chat BOOL NOT NULL,

relationship_to TEXT NULL,

tip_platform INTEGER NULL,
tipped_username TEXT NULL,

phone_number text NULL,
chat_id TEXT NULL,
phone_number TEXT NULL,

state integer NOT NULL,

Expand Down
52 changes: 52 additions & 0 deletions pkg/code/data/intent/tests/tests.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ func RunTests(t *testing.T, s intent.Store, teardown func()) {
testGetLatestSaveRecentRootIntentForTreasury,
testGetOriginalGiftCardIssuedIntent,
testGetGiftCardClaimedIntent,
testChatPayment,
} {
tf(t, s)
teardown()
Expand Down Expand Up @@ -1011,3 +1012,54 @@ func testGetGiftCardClaimedIntent(t *testing.T, s intent.Store) {
assert.Equal(t, "i9", actual.IntentId)
})
}

func testChatPayment(t *testing.T, s intent.Store) {
t.Run("testChatPayment", func(t *testing.T) {
record := &intent.Record{
IntentId: "i1",
IntentType: intent.SendPrivatePayment,
InitiatorOwnerAccount: "init1",
SendPrivatePaymentMetadata: &intent.SendPrivatePaymentMetadata{
DestinationOwnerAccount: "do",
DestinationTokenAccount: "dt",
Quantity: 1,
ExchangeCurrency: "USD",
ExchangeRate: 1,
NativeAmount: 1,
UsdMarketValue: 1,
IsChat: true,
ChatId: "chatId",
},
}
require.NoError(t, s.Save(context.Background(), record))

saved, err := s.Get(context.Background(), record.IntentId)
require.NoError(t, err)
require.Equal(t, record, saved)
})

t.Run("testChatPayment invalid", func(t *testing.T) {
base := &intent.Record{
IntentId: "i1",
IntentType: intent.SendPrivatePayment,
InitiatorOwnerAccount: "init1",
SendPrivatePaymentMetadata: &intent.SendPrivatePaymentMetadata{
DestinationOwnerAccount: "do",
DestinationTokenAccount: "dt",
Quantity: 1,
ExchangeCurrency: "USD",
ExchangeRate: 1,
NativeAmount: 1,
UsdMarketValue: 1,
},
}

r := base.Clone()
r.SendPrivatePaymentMetadata.IsChat = true
require.Error(t, s.Save(context.Background(), &r))

r = base.Clone()
r.SendPrivatePaymentMetadata.ChatId = "chatId"
require.Error(t, s.Save(context.Background(), &r))
})
}
12 changes: 6 additions & 6 deletions pkg/code/push/notifications.go
Original file line number Diff line number Diff line change
Expand Up @@ -320,15 +320,15 @@ func SendChatMessagePushNotification(
for _, content := range chatMessage.Content {
var contentToPush *chatpb.Content
switch typedContent := content.Type.(type) {
case *chatpb.Content_Localized:
localizedPushBody, err := localization.Localize(locale, typedContent.Localized.KeyOrText)
case *chatpb.Content_ServerLocalized:
localizedPushBody, err := localization.Localize(locale, typedContent.ServerLocalized.KeyOrText)
if err != nil {
continue
}

contentToPush = &chatpb.Content{
Type: &chatpb.Content_Localized{
Localized: &chatpb.LocalizedContent{
Type: &chatpb.Content_ServerLocalized{
ServerLocalized: &chatpb.ServerLocalizedContent{
KeyOrText: localizedPushBody,
},
},
Expand Down Expand Up @@ -358,8 +358,8 @@ func SendChatMessagePushNotification(
}

contentToPush = &chatpb.Content{
Type: &chatpb.Content_Localized{
Localized: &chatpb.LocalizedContent{
Type: &chatpb.Content_ServerLocalized{
ServerLocalized: &chatpb.ServerLocalizedContent{
KeyOrText: localizedPushBody,
},
},
Expand Down
Loading
Loading