Compare commits

..

No commits in common. "master" and "v1.5.6" have entirely different histories.

11 changed files with 1768 additions and 19073 deletions

View file

@ -23,18 +23,18 @@ func IsCommand(text string) bool {
func CheckCommand(text string, entities []*TextEntity) string {
if IsCommand(text) {
cmd := text
var cmd string
// e.g. ["/hello 123", "/hell o 123"]
// Result: "/hello", "/hell"
if i := strings.Index(cmd, " "); i != -1 {
cmd = cmd[:i]
if i := strings.Index(text, " "); i != -1 {
cmd = text[:i]
}
// e.g.: ["/hello@world_bot", "/hello@", "/hello@123"]
// Result: "/hello"
if i := strings.Index(cmd, "@"); i != -1 {
cmd = cmd[:i]
if i := strings.Index(text, "@"); i != -1 {
cmd = text[:i]
}
return cmd

File diff suppressed because it is too large Load diff

View file

@ -4,9 +4,9 @@ package client
//#cgo freebsd CFLAGS: -I/usr/local/include
//#cgo darwin CFLAGS: -I/usr/local/include
//#cgo windows CFLAGS: -IE:/src/tdlib -IE:/src/tdlib/build
//#cgo linux LDFLAGS: -L/usr/local/lib -ltdjson_static -ltdjson_private -ltdclient -ltdcore -ltdapi -ltdactor -ltddb -ltde2e -ltdsqlite -ltdmtproto -ltdnet -ltdutils -lstdc++ -lssl -lcrypto -ldl -lz -lm
//#cgo freebsd LDFLAGS: -L/usr/local/lib -ltdjson_static -ltdjson_private -ltdclient -ltdcore -ltdapi -ltdactor -ltddb -ltde2e -ltdsqlite -ltdmtproto -ltdnet -ltdutils -lstdc++ -lssl -lcrypto -ldl -lz -lm
//#cgo darwin LDFLAGS: -L/usr/local/lib -L/usr/local/opt/openssl/lib -ltdjson_static -ltdjson_private -ltdclient -ltdcore -ltdapi -ltdactor -ltddb -ltde2e -ltdsqlite -ltdmtproto -ltdnet -ltdutils -lstdc++ -lssl -lcrypto -ldl -lz -lm
//#cgo linux LDFLAGS: -L/usr/local/lib -ltdjson_static -ltdjson_private -ltdclient -ltdcore -ltdapi -ltdactor -ltddb -ltdsqlite -ltdmtproto -ltdnet -ltdutils -lstdc++ -lssl -lcrypto -ldl -lz -lm
//#cgo freebsd LDFLAGS: -L/usr/local/lib -ltdjson_static -ltdjson_private -ltdclient -ltdcore -ltdapi -ltdactor -ltddb -ltdsqlite -ltdmtproto -ltdnet -ltdutils -lstdc++ -lssl -lcrypto -ldl -lz -lm
//#cgo darwin LDFLAGS: -L/usr/local/lib -L/usr/local/opt/openssl/lib -ltdjson_static -ltdjson_private -ltdclient -ltdcore -ltdapi -ltdactor -ltddb -ltdsqlite -ltdmtproto -ltdnet -ltdutils -lstdc++ -lssl -lcrypto -ldl -lz -lm
//#cgo windows LDFLAGS: -LE:/src/tdlib/build/Release -ltdjson
//#include <stdlib.h>
//#include <td/telegram/td_json_client.h>

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 794 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 900 KiB

View file

@ -101,7 +101,7 @@ func main() {
},
InputMessageContent: &tdlib.InputMessagePhoto{
Photo: &tdlib.InputFileLocal{
Path: "./Meru_01.png",
Path: "./myht9-1486821485193084928.jpg",
},
Caption: text,
},
@ -123,13 +123,13 @@ func main() {
InputMessageContents: []tdlib.InputMessageContent{
&tdlib.InputMessagePhoto{
Photo: &tdlib.InputFileLocal{
Path: "./Meru_01.png",
Path: "./myht9-1486821485193084928.jpg",
},
Caption: text,
},
&tdlib.InputMessagePhoto{
Photo: &tdlib.InputFileLocal{
Path: "./Meru_02.png",
Path: "./hisagi_02-1486983199280738309.jpg",
},
},
},

Binary file not shown.

After

Width:  |  Height:  |  Size: 153 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 KiB