string(2430) "{
"success": true,
"user": {
"about": "",
"activity_visible": true,
"alert_optout": [],
"allow_post_profile": "members",
"allow_receive_news_feed": "everyone",
"allow_send_personal_conversation": "members",
"allow_view_identities": "everyone",
"allow_view_profile": "everyone",
"avatar_urls": {
"o": "example/data/avatars/o/0/968.jpg?1630324319",
"h": "example/data/avatars/h/0/968.jpg?1630324319",
"l": "example/data/avatars/l/0/968.jpg?1630324319",
"m": "example/data/avatars/m/0/968.jpg?1630324319",
"s": "example/data/avatars/s/0/968.jpg?1630324319"
},
"can_ban": false,
"can_converse": false,
"can_edit": false,
"can_follow": false,
"can_ignore": false,
"can_post_profile": false,
"can_view_profile": true,
"can_view_profile_posts": true,
"can_warn": false,
"content_show_signature": true,
"creation_watch_state": "watch_email",
"custom_fields": {},
"custom_title": "",
"email": "member@bk.ru",
"email_on_conversation": true,
"gravatar": "",
"interaction_watch_state": "watch_email",
"is_admin": false,
"is_discouraged": false,
"is_moderator": false,
"is_staff": false,
"is_super_admin": false,
"last_activity": 1630771220,
"location": "",
"message_count": 0,
"profile_banner_urls": {
"l": null,
"m": null
},
"push_on_conversation": false,
"push_optout": [],
"question_solution_count": 0,
"reaction_score": 0,
"receive_admin_email": false,
"register_date": 1630324273,
"secondary_group_ids": [],
"show_dob_date": true,
"show_dob_year": false,
"signature": "",
"timezone": "Europe/Moscow",
"trophy_points": 0,
"usa_tfa": false,
"user_group_id": 2,
"user_id": 968,
"user_state": "valid",
"user_title": "\u0418\u0433\u0440\u043e\u043a",
"username": "member",
"view_url": "https://example/index.php?members/member.1/",
"visible": true,
"vote_score": 0,
"website": ""
}
}"
(main.Ucp) {
Id: (int) 59,
Text: (string) (len=13) "tetatettttt/.",
Closed: (int) 0,
Asker: (int) 380236476,
Answer: (int) 380236476
}
update_answer_id_start, err33 := db.Exec("UPDATE `ucp` SET `closed` = '1' WHERE `id` = ?", res_trim_int)
lp.MessageNew(func(_ context.Context, obj events.MessageNewObject) {
msg := obj.Message.Text
msg_from_id := obj.Message.FromID
startWith := "/close"
starts := strings.HasPrefix(msg, startWith)
if starts == true {
res_trim := strings.Trim(msg, "/close ")
if res_trim != "" {
res_answer_active_status, err35 := db.Query("SELECT `answer`, `asker`, `closed` FROM `ucp` WHERE `closed` = '0' AND (`answer` = ? OR `asker` = ?)", msg_from_id, msg_from_id)
if err35 != nil {
panic(err35)
}
for res_answer_active_status.Next() {
err36 := res_answer_active_status.Scan(&ucp.Answer, &ucp.Asker, &ucp.Closed)
if err36 != nil {
panic(err36)
}
}
if ucp.Closed == 0 {
//////////обработка сообщения
}
}
}
)}
LIST QUESTION:
ID- 19 TEXT- test
ID- 20 TEXT- hdjsksb
ID- 21 TEXT- jsjsj
ID- 22 TEXT- tetet
ID- 23 TEXT- tetete
ID- 24 TEXT- sdasd
ID- 25 TEXT- te
ID- 26 TEXT- test
ID- 27 TEXT- teasihidoah