Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
928 B
3
Indexable
Never
	puts "reached here"
	set index [lsearch -exact $message_obj "notification"]
	puts "index $index"
	#If any notification is sent without title, the code will add it
    #BAYT-15103 debug
#    if {[dev_projects generic]} {
        set index [lsearch -exact $message_obj "notification"]
        if {$index != -1} {
            set index [expr $index + 1]
            if {[lsearch -exact [lindex $a 3] "title"] == -1} {
            set oldList [lindex $a $index]
            set newList [linsert $oldList 0 title "Bayt.com"]
            set message_obj [lreplace $a $index $index $newList]
            }
         }
#    } else {
        if [catch {
           if { ![dict exists $message_obj "title"] } {
            dict append message_obj title "Bayt.com"
           }
        } err] {
            set extra_info $message_obj
            byt_report_error -error_group "Debug Notify" "Missing key error" $err $extra_info
        }