File tree Expand file tree Collapse file tree 3 files changed +19
-7
lines changed Expand file tree Collapse file tree 3 files changed +19
-7
lines changed Original file line number Diff line number Diff line change @@ -38,11 +38,16 @@ func (me *AndroidNotificationServer) Initialize() bool {
38
38
func (me * AndroidNotificationServer ) SendNotification (msg * PushNotification ) PushResponse {
39
39
pushType := msg .Type
40
40
data := map [string ]interface {}{
41
- "ack_id" : msg .AckID ,
42
- "type" : pushType ,
43
- "badge" : msg .Badge ,
44
- "version" : msg .Version ,
45
- "channel_id" : msg .ChannelID ,
41
+ "ack_id" : msg .AckID ,
42
+ "type" : pushType ,
43
+ "badge" : msg .Badge ,
44
+ "version" : msg .Version ,
45
+ "channel_id" : msg .ChannelID ,
46
+ "is_crt_enabled" : msg .IsCRTEnabled ,
47
+ }
48
+
49
+ if msg .RootID != "" {
50
+ data ["root_id" ] = msg .RootID
46
51
}
47
52
48
53
if msg .IsIDLoaded {
@@ -58,7 +63,6 @@ func (me *AndroidNotificationServer) SendNotification(msg *PushNotification) Pus
58
63
data ["message" ] = emoji .Sprint (msg .Message )
59
64
data ["channel_name" ] = msg .ChannelName
60
65
data ["post_id" ] = msg .PostID
61
- data ["root_id" ] = msg .RootID
62
66
data ["override_username" ] = msg .OverrideUsername
63
67
data ["override_icon_url" ] = msg .OverrideIconURL
64
68
data ["from_webhook" ] = msg .FromWebhook
Original file line number Diff line number Diff line change @@ -129,9 +129,16 @@ func (me *AppleNotificationServer) SendNotification(msg *PushNotification) PushR
129
129
data .Custom ("ack_id" , msg .AckID )
130
130
}
131
131
132
+ data .Custom ("is_crt_enabled" , msg .IsCRTEnabled )
133
+
132
134
if msg .ChannelID != "" {
133
135
data .Custom ("channel_id" , msg .ChannelID )
134
- data .ThreadID (msg .ChannelID )
136
+
137
+ if msg .IsCRTEnabled && msg .RootID != "" {
138
+ data .ThreadID (msg .RootID )
139
+ } else {
140
+ data .ThreadID (msg .ChannelID )
141
+ }
135
142
}
136
143
137
144
if msg .TeamID != "" {
Original file line number Diff line number Diff line change @@ -51,6 +51,7 @@ type PushNotification struct {
51
51
OverrideIconURL string `json:"override_icon_url"`
52
52
FromWebhook string `json:"from_webhook"`
53
53
Version string `json:"version"`
54
+ IsCRTEnabled bool `json:"is_crt_enabled"`
54
55
IsIDLoaded bool `json:"is_id_loaded"`
55
56
}
56
57
You can’t perform that action at this time.
0 commit comments