зеркало из https://github.com/nextcloud/deck.git
Merge pull request #6641 from nextcloud/fix/activity
fix: Proper rich object formats
This commit is contained in:
Коммит
eeda7b4fb9
|
@ -109,7 +109,7 @@ class DeckProvider implements IProvider {
|
|||
}
|
||||
$board = [
|
||||
'type' => 'highlight',
|
||||
'id' => $event->getObjectId(),
|
||||
'id' => (string)$event->getObjectId(),
|
||||
'name' => $event->getObjectName(),
|
||||
'link' => $this->deckUrl('/board/' . $event->getObjectId()),
|
||||
];
|
||||
|
@ -126,7 +126,7 @@ class DeckProvider implements IProvider {
|
|||
}
|
||||
$card = [
|
||||
'type' => 'highlight',
|
||||
'id' => $event->getObjectId(),
|
||||
'id' => (string)$event->getObjectId(),
|
||||
'name' => $event->getObjectName(),
|
||||
];
|
||||
|
||||
|
@ -213,7 +213,7 @@ class DeckProvider implements IProvider {
|
|||
if (array_key_exists($paramName, $subjectParams)) {
|
||||
$params[$paramName] = [
|
||||
'type' => 'highlight',
|
||||
'id' => $subjectParams[$paramName]['id'],
|
||||
'id' => (string)$subjectParams[$paramName]['id'],
|
||||
'name' => $subjectParams[$paramName]['title'],
|
||||
'link' => $this->deckUrl('/board/' . $subjectParams[$paramName]['id'] . '/'),
|
||||
];
|
||||
|
@ -224,7 +224,7 @@ class DeckProvider implements IProvider {
|
|||
if (array_key_exists($paramName, $subjectParams)) {
|
||||
$params[$paramName] = [
|
||||
'type' => 'highlight',
|
||||
'id' => $subjectParams[$paramName]['id'],
|
||||
'id' => (string)$subjectParams[$paramName]['id'],
|
||||
'name' => $subjectParams[$paramName]['title'],
|
||||
];
|
||||
}
|
||||
|
@ -235,7 +235,7 @@ class DeckProvider implements IProvider {
|
|||
if (array_key_exists($paramName, $subjectParams)) {
|
||||
$params[$paramName] = [
|
||||
'type' => 'highlight',
|
||||
'id' => $subjectParams[$paramName]['id'],
|
||||
'id' => (string)$subjectParams[$paramName]['id'],
|
||||
'name' => $subjectParams[$paramName]['data'],
|
||||
'link' => $this->urlGenerator->linkToRoute('deck.attachment.display', ['cardId' => $subjectParams['card']['id'], 'attachmentId' => $subjectParams['attachment']['id']]),
|
||||
];
|
||||
|
@ -259,7 +259,7 @@ class DeckProvider implements IProvider {
|
|||
if (array_key_exists('label', $subjectParams)) {
|
||||
$params['label'] = [
|
||||
'type' => 'highlight',
|
||||
'id' => $subjectParams['label']['id'],
|
||||
'id' => (string)$subjectParams['label']['id'],
|
||||
'name' => $subjectParams['label']['title']
|
||||
];
|
||||
}
|
||||
|
@ -278,7 +278,7 @@ class DeckProvider implements IProvider {
|
|||
} else {
|
||||
$params['acl'] = [
|
||||
'type' => 'highlight',
|
||||
'id' => $subjectParams['acl']['participant'],
|
||||
'id' => (string)$subjectParams['acl']['participant'],
|
||||
'name' => $subjectParams['acl']['participant']
|
||||
];
|
||||
}
|
||||
|
@ -294,7 +294,7 @@ class DeckProvider implements IProvider {
|
|||
$event->setParsedMessage($comment->getMessage());
|
||||
$params['comment'] = [
|
||||
'type' => 'highlight',
|
||||
'id' => $subjectParams['comment'],
|
||||
'id' => (string)$subjectParams['comment'],
|
||||
'name' => $comment->getMessage()
|
||||
];
|
||||
} catch (NotFoundException $e) {
|
||||
|
@ -343,22 +343,22 @@ class DeckProvider implements IProvider {
|
|||
if (array_key_exists('before', $subjectParams)) {
|
||||
$params['before'] = [
|
||||
'type' => 'highlight',
|
||||
'id' => $subjectParams['before'],
|
||||
'name' => $subjectParams['before']
|
||||
'id' => (string)$subjectParams['before'],
|
||||
'name' => $subjectParams['before'] ?? ''
|
||||
];
|
||||
}
|
||||
if (array_key_exists('after', $subjectParams)) {
|
||||
$params['after'] = [
|
||||
'type' => 'highlight',
|
||||
'id' => $subjectParams['after'],
|
||||
'name' => $subjectParams['after']
|
||||
'id' => (string)$subjectParams['after'],
|
||||
'name' => $subjectParams['after'] ?? ''
|
||||
];
|
||||
}
|
||||
if (array_key_exists('card', $subjectParams) && $event->getSubject() === ActivityManager::SUBJECT_CARD_UPDATE_TITLE) {
|
||||
$params['card'] = [
|
||||
'type' => 'highlight',
|
||||
'id' => $subjectParams['after'],
|
||||
'name' => $subjectParams['after']
|
||||
'id' => (string)$subjectParams['after'],
|
||||
'name' => $subjectParams['after'] ?? ''
|
||||
];
|
||||
}
|
||||
return $params;
|
||||
|
|
Загрузка…
Ссылка в новой задаче