From a1eb39872ba5017be218d48f319addf3d40ff05d Mon Sep 17 00:00:00 2001 From: Mario Date: Sun, 12 Feb 2023 10:43:31 +0000 Subject: implement hq widget author image and notifications updates --- Zotlabs/Lib/Enotify.php | 2 +- Zotlabs/Widget/Channel_activities.php | 4 ++-- Zotlabs/Widget/Messages.php | 4 +++- 3 files changed, 6 insertions(+), 4 deletions(-) (limited to 'Zotlabs') diff --git a/Zotlabs/Lib/Enotify.php b/Zotlabs/Lib/Enotify.php index 2015b260d..823e1df29 100644 --- a/Zotlabs/Lib/Enotify.php +++ b/Zotlabs/Lib/Enotify.php @@ -869,7 +869,7 @@ class Enotify { $x = array( 'notify_link' => $item['llink'], 'name' => $item[$who]['xchan_name'], - 'addr' => $item[$who]['xchan_addr'] ?? $item[$who]['xchan_url'], + 'addr' => $item[$who]['xchan_addr'] ? $item[$who]['xchan_addr'] : $item[$who]['xchan_url'], 'url' => $item[$who]['xchan_url'], 'photo' => $item[$who]['xchan_photo_s'], 'when' => (($edit) ? datetime_convert('UTC', date_default_timezone_get(), $item['edited']) : datetime_convert('UTC', date_default_timezone_get(), $item['created'])), diff --git a/Zotlabs/Widget/Channel_activities.php b/Zotlabs/Widget/Channel_activities.php index 06080f8c8..a799ea81e 100644 --- a/Zotlabs/Widget/Channel_activities.php +++ b/Zotlabs/Widget/Channel_activities.php @@ -179,7 +179,7 @@ class Channel_activities { $account = App::get_account(); - $r = q("SELECT channel_id, channel_name, xchan_photo_s FROM channel + $r = q("SELECT channel_id, channel_name, xchan_addr, xchan_photo_s FROM channel LEFT JOIN xchan ON channel_hash = xchan_hash WHERE channel_account_id = %d AND channel_id != %d AND channel_removed = 0", @@ -223,7 +223,7 @@ class Channel_activities { $i[] = [ 'url' => z_root() . '/manage/' . $rr['channel_id'], 'title' => '', - 'summary' => '' . $rr['channel_name'], + 'summary' => '
' . '' . $rr['channel_name'] . '
' . $rr['xchan_addr'] . '
', 'footer' => $footer ]; diff --git a/Zotlabs/Widget/Messages.php b/Zotlabs/Widget/Messages.php index 418e49169..a37a178f9 100644 --- a/Zotlabs/Widget/Messages.php +++ b/Zotlabs/Widget/Messages.php @@ -162,7 +162,7 @@ class Messages { $summary = '...'; } else { - $summary = substr_words($summary, 68); + $summary = substr_words($summary, 140); } switch(intval($item['item_private'])) { @@ -178,6 +178,7 @@ class Messages { $entries[$i]['author_name'] = $item['author']['xchan_name']; $entries[$i]['author_addr'] = (($item['author']['xchan_addr']) ? $item['author']['xchan_addr'] : $item['author']['xchan_url']); + $entries[$i]['author_img'] = $item['author']['xchan_photo_s']; $entries[$i]['info'] = $info; $entries[$i]['created'] = datetime_convert('UTC', date_default_timezone_get(), $item['created']); $entries[$i]['summary'] = $summary; @@ -282,6 +283,7 @@ class Messages { $entries[$i]['author_name'] = $notice['xname']; $entries[$i]['author_addr'] = $notice['url']; + $entries[$i]['author_img'] = $notice['photo'];// $item['author']['xchan_photo_s']; $entries[$i]['info'] = ''; $entries[$i]['created'] = datetime_convert('UTC', date_default_timezone_get(), $notice['created']); $entries[$i]['summary'] = $summary; -- cgit v1.2.3