@@ -96,9 +96,9 @@ func (d DiscordReceiver) Send(m APMessage) error {
9696
9797 sort .Strings (keys )
9898 buff := new (bytes.Buffer )
99- r , _ := regexp .Compile (".*[Tt]ext" )
100- l , _ := regexp .Compile (".*[Ll]ink" )
101- ts , _ := regexp .Compile (".*[Tt]imestamp" )
99+ r , _ := regexp .Compile (".*[Tt]ext$ " )
100+ l , _ := regexp .Compile (".*[Ll]ink$ " )
101+ ts , _ := regexp .Compile (".*[Tt]imestamp$ " )
102102 var embeds []DiscordEmbed
103103 var title , content string
104104 if d .MessageGoTemplate != "" {
@@ -153,13 +153,13 @@ func (d DiscordReceiver) Send(m APMessage) error {
153153
154154 for _ , key := range keys {
155155 v := fmt .Sprintf ("%v" , m [key ])
156- if ts , _ := regexp .Compile (".*[Ff]light[Nn]umber" ); ts .Match ([]byte (key )) {
156+ if ts , _ := regexp .Compile (".*[Ff]light[Nn]umber$ " ); ts .Match ([]byte (key )) {
157157 transmitter = " from " + AircraftOrTower (v )
158158 }
159- if ts , _ := regexp .Compile (".*[Tt]humbnail[Ll]ink" ); ts .Match ([]byte (key )) {
159+ if ts , _ := regexp .Compile (".*[Tt]humbnail[Ll]ink$ " ); ts .Match ([]byte (key )) {
160160 thumbnail = v
161161 }
162- if ts , _ := regexp .Compile (".*[Ff]rom" ); ts .Match ([]byte (key )) {
162+ if ts , _ := regexp .Compile (".*[Ff]rom$ " ); ts .Match ([]byte (key )) {
163163 transmitter = " from " + v
164164 }
165165 if slices .Contains (d .EmbedColorFacetFields , key ) {
0 commit comments