public
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
text := import("text")
|
||||
fmt := import("fmt")
|
||||
|
||||
fmt.println(msgText)
|
||||
|
||||
if(inProtocol == "telegram"){
|
||||
if text.index(msgText, "https") > 1 {
|
||||
media_array := text.re_split(":", msgText, 2)
|
||||
fmt.println(media_array)
|
||||
if len(media_array) > 1 {
|
||||
//TG desktop
|
||||
media := text.trim_prefix(media_array[1]," ")
|
||||
//msgText=media
|
||||
bold := "**"+media+"**"
|
||||
//link := "[link]("+media+")"
|
||||
//msgText =link
|
||||
msgText = text.re_replace("MEDIA", bold, msgText)
|
||||
//msgText=""
|
||||
//msgText=text.re_replace("matterbridge",msgText,"matterbridge (https://github.com/42wim/matterbridge)")
|
||||
}else{
|
||||
//TG android
|
||||
msgText="https:"+media_array[0]
|
||||
}
|
||||
|
||||
}
|
||||
}else{
|
||||
//capitalize + bold
|
||||
msgUsername = "<strong>"+text.title(msgUsername)+"</strong>"
|
||||
msgText = msgText
|
||||
}
|
||||
Reference in New Issue
Block a user