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
9ae0cdea
Unverified
Commit
9ae0cdea
authored
Jun 09, 2019
by
Armando Lüscher
Committed by
GitHub
Jun 09, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #967 from noplanman/427-fix_forward_date
Save forward_date correctly to the DB.
parents
1785d98f
f4b67e64
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
CHANGELOG.md
CHANGELOG.md
+1
-0
DB.php
src/DB.php
+4
-5
No files found.
CHANGELOG.md
View file @
9ae0cdea
...
...
@@ -9,6 +9,7 @@ Exclamation symbols (:exclamation:) note something of importance e.g. breaking c
### Deprecated
### Removed
### Fixed
-
`forward_date`
is now correctly saved to the DB.
### Security
## [0.57.0] - 2019-06-01
...
...
src/DB.php
View file @
9ae0cdea
...
...
@@ -881,18 +881,17 @@ class DB
}
// Insert the forwarded message user in users table
$forward_date
=
null
;
$forward_date
=
$message
->
getForwardDate
()
?
self
::
getTimestamp
(
$message
->
getForwardDate
())
:
null
;
$forward_from
=
$message
->
getForwardFrom
();
if
(
$forward_from
instanceof
User
)
{
self
::
insertUser
(
$forward_from
,
$forward_date
);
self
::
insertUser
(
$forward_from
);
$forward_from
=
$forward_from
->
getId
();
$forward_date
=
self
::
getTimestamp
(
$message
->
getForwardDate
());
}
$forward_from_chat
=
$message
->
getForwardFromChat
();
if
(
$forward_from_chat
instanceof
Chat
)
{
self
::
insertChat
(
$forward_from_chat
,
$forward_date
);
self
::
insertChat
(
$forward_from_chat
);
$forward_from_chat
=
$forward_from_chat
->
getId
();
$forward_date
=
self
::
getTimestamp
(
$message
->
getForwardDate
());
}
// New and left chat member
...
...
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