Merge pull request #10414 from annando/oauth

API: "created_at" is timestamp
This commit is contained in:
Hypolite Petovan 2021-06-18 09:50:14 -04:00 committed by GitHub
commit 08c4d7eedc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 5 deletions

View file

@ -200,6 +200,7 @@ Here is a list of known working clients:
* [Tooot](https://tooot.app/) * [Tooot](https://tooot.app/)
* [Tusky](https://tusky.app) * [Tusky](https://tusky.app)
* [Twidere](https://dimension.im/) ([F-Droid](https://f-droid.org/repository/browse/?fdid=org.mariotaku.twidere), [Google Play](https://play.google.com/store/apps/details?id=com.twidere.twiderex), [GitHub](https://github.com/TwidereProject/Twidere-Android)) * [Twidere](https://dimension.im/) ([F-Droid](https://f-droid.org/repository/browse/?fdid=org.mariotaku.twidere), [Google Play](https://play.google.com/store/apps/details?id=com.twidere.twiderex), [GitHub](https://github.com/TwidereProject/Twidere-Android))
* [TwidereX](https://github.com/TwidereProject/TwidereX-Android)
* [twitlatte](https://github.com/moko256/twitlatte) * [twitlatte](https://github.com/moko256/twitlatte)
* [Yuito](https://github.com/accelforce/Yuito) * [Yuito](https://github.com/accelforce/Yuito)

View file

@ -212,6 +212,7 @@ Hier ist eine Liste von Clients, die speziell für Friendica entwickelt werden o
* [Tooot](https://tooot.app/) * [Tooot](https://tooot.app/)
* [Tusky](https://tusky.app) * [Tusky](https://tusky.app)
* [Twidere](https://dimension.im/) ([F-Droid](https://f-droid.org/repository/browse/?fdid=org.mariotaku.twidere), [Google Play](https://play.google.com/store/apps/details?id=com.twidere.twiderex), [GitHub](https://github.com/TwidereProject/Twidere-Android)) * [Twidere](https://dimension.im/) ([F-Droid](https://f-droid.org/repository/browse/?fdid=org.mariotaku.twidere), [Google Play](https://play.google.com/store/apps/details?id=com.twidere.twiderex), [GitHub](https://github.com/TwidereProject/Twidere-Android))
* [TwidereX](https://github.com/TwidereProject/TwidereX-Android)
* [twitlatte](https://github.com/moko256/twitlatte) * [twitlatte](https://github.com/moko256/twitlatte)
* [Yuito](https://github.com/accelforce/Yuito) * [Yuito](https://github.com/accelforce/Yuito)

View file

@ -22,12 +22,11 @@
namespace Friendica\Object\Api\Mastodon; namespace Friendica\Object\Api\Mastodon;
use Friendica\BaseDataTransferObject; use Friendica\BaseDataTransferObject;
use Friendica\Util\DateTimeFormat;
/** /**
* Class Error * Class Token
* *
* @see https://docs.joinmastodon.org/entities/error * @see https://docs.joinmastodon.org/entities/token/
*/ */
class Token extends BaseDataTransferObject class Token extends BaseDataTransferObject
{ {
@ -37,7 +36,7 @@ class Token extends BaseDataTransferObject
protected $token_type; protected $token_type;
/** @var string */ /** @var string */
protected $scope; protected $scope;
/** @var string (Datetime) */ /** @var int (timestamp) */
protected $created_at; protected $created_at;
/** /**
@ -53,6 +52,6 @@ class Token extends BaseDataTransferObject
$this->access_token = $access_token; $this->access_token = $access_token;
$this->token_type = $token_type; $this->token_type = $token_type;
$this->scope = $scope; $this->scope = $scope;
$this->created_at = DateTimeFormat::utc($created_at, DateTimeFormat::JSON); $this->created_at = strtotime($created_at);
} }
} }