Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
TelegramBot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
TelegramBot
Commits
0904162a
Unverified
Commit
0904162a
authored
Jun 03, 2019
by
Armando Lüscher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Also save the Message reply_markup to DB.
parent
a9b15e84
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
2 deletions
+6
-2
DB.php
src/DB.php
+3
-2
Message.php
src/Entities/Message.php
+1
-0
structure.sql
structure.sql
+1
-0
unreleased.sql
utils/db-schema-update/unreleased.sql
+1
-0
No files found.
src/DB.php
View file @
0904162a
...
...
@@ -927,7 +927,7 @@ class DB
`location`, `venue`, `poll`, `new_chat_members`, `left_chat_member`,
`new_chat_title`, `new_chat_photo`, `delete_chat_photo`, `group_chat_created`,
`supergroup_chat_created`, `channel_chat_created`, `migrate_to_chat_id`, `migrate_from_chat_id`,
`pinned_message`, `invoice`, `successful_payment`, `connected_website`, `passport_data`
`pinned_message`, `invoice`, `successful_payment`, `connected_website`, `passport_data`
, `reply_markup`
) VALUES (
:message_id, :user_id, :chat_id, :date, :forward_from, :forward_from_chat, :forward_from_message_id,
:forward_signature, :forward_sender_name, :forward_date,
...
...
@@ -936,7 +936,7 @@ class DB
:location, :venue, :poll, :new_chat_members, :left_chat_member,
:new_chat_title, :new_chat_photo, :delete_chat_photo, :group_chat_created,
:supergroup_chat_created, :channel_chat_created, :migrate_to_chat_id, :migrate_from_chat_id,
:pinned_message, :invoice, :successful_payment, :connected_website, :passport_data
:pinned_message, :invoice, :successful_payment, :connected_website, :passport_data
, :reply_markup
)
'
);
...
...
@@ -1008,6 +1008,7 @@ class DB
$sth
->
bindValue
(
':successful_payment'
,
$message
->
getSuccessfulPayment
());
$sth
->
bindValue
(
':connected_website'
,
$message
->
getConnectedWebsite
());
$sth
->
bindValue
(
':passport_data'
,
$message
->
getPassportData
());
$sth
->
bindValue
(
':reply_markup'
,
$message
->
getReplyMarkup
());
return
$sth
->
execute
();
}
catch
(
PDOException
$e
)
{
...
...
src/Entities/Message.php
View file @
0904162a
...
...
@@ -315,6 +315,7 @@ class Message extends Entity
'invoice'
,
'successful_payment'
,
'passport_data'
,
'reply_markup'
,
];
$is_command
=
strlen
(
$this
->
getCommand
())
>
0
;
...
...
structure.sql
View file @
0904162a
...
...
@@ -115,6 +115,7 @@ CREATE TABLE IF NOT EXISTS `message` (
`successful_payment`
TEXT
NULL
COMMENT
'Message is a service message about a successful payment, information about the payment'
,
`connected_website`
TEXT
NULL
COMMENT
'The domain name of the website on which the user has logged in.'
,
`passport_data`
TEXT
NULL
COMMENT
'Telegram Passport data'
,
`reply_markup`
TEXT
NULL
COMMENT
'Inline keyboard attached to the message'
,
PRIMARY
KEY
(
`chat_id`
,
`id`
),
KEY
`user_id`
(
`user_id`
),
...
...
utils/db-schema-update/unreleased.sql
View file @
0904162a
ALTER
TABLE
`message`
ADD
COLUMN
`reply_markup`
TEXT
NULL
COMMENT
'Inline keyboard attached to the message'
AFTER
`passport_data`
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment