Skip to content

Commit 2ebf398

Browse files
committed
fix dashboard api for clients
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
1 parent f13cadf commit 2ebf398

4 files changed

Lines changed: 6 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
66

77
## [Unreleased]
88

9-
## 1.0.10 – 2022-10-13
9+
## 1.0.11 – 2022-10-13
1010
### Changed
1111
- use @nextcloud/vue v7.0.0
1212
- improve reference widget wrapping

appinfo/info.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<description><![CDATA[GitHub integration provides a dashboard widget displaying your most important notifications
77
and a unified search provider for repositories, issues and pull requests. It also provides a link reference provider
88
to render links to issues, pull requests and comments in Talk and Text.]]></description>
9-
<version>1.0.10</version>
9+
<version>1.0.11</version>
1010
<licence>agpl</licence>
1111
<author>Julien Veyssier</author>
1212
<namespace>Github</namespace>

lib/Dashboard/GithubWidget.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,9 @@ public function load(): void {
145145
*/
146146
public function getItems(string $userId, ?string $since = null, int $limit = 7): array {
147147
$notifications = $this->githubAPIService->getNotifications($this->userId, null, $since, $limit);
148+
if (isset($notifications['error'])) {
149+
return [];
150+
}
148151
$that = $this;
149152
return array_map(static function(array $notification) use ($that) {
150153
return $that->githubAPIService->getWidgetFromNotification($notification);

lib/Service/GithubAPIService.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ private function getItemIconUrl(array $notification): string {
134134
? ''
135135
: $this->urlGenerator->getAbsoluteURL(
136136
$this->urlGenerator->linkToRoute(Application::APP_ID . '.githubAPI.getAvatar', [
137-
'githubUserName' => $repoOwnerLogin,
137+
'githubLogin' => $repoOwnerLogin,
138138
])
139139
);
140140
}

0 commit comments

Comments
 (0)