Added relationship status

This commit is contained in:
Mattia Mascarello 2021-12-29 02:02:52 +01:00 committed by GitHub
parent 60a2504099
commit 35c5b9f353
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1176,6 +1176,33 @@ switch ($DATA["message"]["chat"]["id"]) {
$u->pvtNotice = $t;
}
if ($u->oneEdit != $u->status && $u->oneEdit) {
$u->oneEdit = false;
$u->status = "end";
$u->save();
API("sendMessage", ["chat_id" => $DATA["message"]["chat"]["id"], "text" => $GLOBALS["config"]["lgbt"]["text"]["updatedData"], "reply_to_message_id" => $DATA["message"]["message_id"]]);
endM($DATA);
break;
}
$u->status = "askrel";
$u->save();
API("sendMessage", ["chat_id" => $DATA["message"]["chat"]["id"], "text" => $GLOBALS["config"]["lgbt"]["text"]["relM"], "reply_to_message_id" => $DATA["message"]["message_id"]]);
break;
case "askrel":
if ($u->oneEdit != $u->status) {
if (isNo($t)) {
$u->rel = false;
$u->save();
API("sendMessage", ["chat_id" => $DATA["message"]["chat"]["id"], "text" => $GLOBALS["config"]["lgbt"]["text"]["noProblem"], "reply_to_message_id" => $DATA["message"]["message_id"]]);
} else {
$u->rel = $t;
$u->save();
API("sendMessage", ["chat_id" => $DATA["message"]["chat"]["id"], "text" => $GLOBALS["config"]["lgbt"]["text"]["thanks"], "reply_to_message_id" => $DATA["message"]["message_id"]]);
}
}
if ($u->oneEdit != $u->status && $u->oneEdit) {
$u->oneEdit = false;
$u->status = "end";
@ -1189,7 +1216,7 @@ switch ($DATA["message"]["chat"]["id"]) {
$u->save();
API("sendMessage", ["chat_id" => $DATA["message"]["chat"]["id"], "text" => $GLOBALS["config"]["lgbt"]["text"]["bioM"], "reply_to_message_id" => $DATA["message"]["message_id"]]);
break;
break
case "askBio":
if ($u->oneEdit != $u->status) {