Addons are now using the new post functions

This commit is contained in:
Michael 2021-01-17 00:00:32 +00:00
parent 0417ee39fd
commit 1533d9a758
7 changed files with 26 additions and 20 deletions

View file

@ -34,6 +34,7 @@ use Friendica\Core\Logger;
use Friendica\Database\DBA;
use Friendica\DI;
use Friendica\Model\Item;
use Friendica\Model\Post;
use Friendica\Model\User;
function windowsphonepush_install()
@ -184,7 +185,7 @@ function windowsphonepush_cron()
$senditemtext = DI::pConfig()->get($rr['uid'], 'windowsphonepush', 'senditemtext');
if ($senditemtext == 1) {
// load item with the max id
$item = Item::selectFirst(['author-name', 'body'], ['id' => $count[0]['max']]);
$item = Post::selectFirst(['author-name', 'body'], ['id' => $count[0]['max']]);
// as user allows to send the item, we want to show the sender of the item in the toast
// toasts are limited to one line, therefore place is limited - author shall be in