Browse Source

Update nextcloud server and notifications to 26.0.1

pull/267/head
jld3103 2 years ago
parent
commit
c1fd468521
No known key found for this signature in database
GPG Key ID: 9062417B9E8EB7B3
  1. 2
      external/nextcloud-notifications
  2. 2
      external/nextcloud-server
  3. 2
      packages/neon/neon/lib/src/utils/push_utils.dart
  4. 2
      packages/neon/neon_notifications/lib/pages/main.dart
  5. 19
      packages/nextcloud/lib/src/nextcloud.openapi.dart
  6. 13
      packages/nextcloud/lib/src/nextcloud.openapi.g.dart
  7. 10
      packages/nextcloud/lib/src/nextcloud.openapi.json
  8. 6
      packages/nextcloud/test/core.dart
  9. 2
      specs/core.json
  10. 8
      specs/notifications.json
  11. 2
      specs/templates/appinfo_core.xml
  12. 2
      specs/templates/core.json
  13. 40
      specs/templates/notifications.json
  14. 2
      tool/Dockerfile.dev

2
external/nextcloud-notifications vendored

@ -1 +1 @@
Subproject commit a380eabe8b369a7103d1f529c82d6b44dce4f6a6
Subproject commit 69069071ff7a5775ddb06418f55f39593afdbbb1

2
external/nextcloud-server vendored

@ -1 +1 @@
Subproject commit 62cfd3b4c9ff4d8cdbbe6dcc8b63a1085bb94e3d
Subproject commit 8cfcb8e2a2f9ba1bbe993161f00d7dcebf07708f

2
packages/neon/neon/lib/src/utils/push_utils.dart

@ -91,6 +91,7 @@ class PushUtils {
debugPrint(s.toString());
}
if (notification?.shouldNotify ?? true) {
final appID = notification?.app ?? pushNotification.subject.app ?? 'nextcloud';
String? appName = localizations.appImplementationName(appID);
if (appName == '') {
@ -124,6 +125,7 @@ class PushUtils {
payload: json.encode(pushNotification.toJson()),
);
}
}
Global.onPushNotificationReceived?.call(instance);
}

2
packages/neon/neon_notifications/lib/pages/main.dart

@ -81,7 +81,7 @@ class _NotificationsMainPageState extends State<NotificationsMainPage> {
width: 40,
height: 40,
child: NeonCachedUrlImage(
url: notification.icon,
url: notification.icon!,
width: 40,
height: 40,
svgColor: Theme.of(context).colorScheme.primary,

19
packages/nextcloud/lib/src/nextcloud.openapi.dart

@ -4743,12 +4743,13 @@ class NextcloudNotificationsNotification {
required this.subject,
required this.message,
required this.link,
required this.subjectRich,
required this.subjectRichParameters,
required this.messageRich,
required this.messageRichParameters,
required this.icon,
required this.actions,
this.subjectRich,
this.subjectRichParameters,
this.messageRich,
this.messageRichParameters,
this.icon,
this.shouldNotify,
});
// coverage:ignore-start
@ -4782,15 +4783,17 @@ class NextcloudNotificationsNotification {
final String link;
final String subjectRich;
final String? subjectRich;
final dynamic subjectRichParameters;
final String messageRich;
final String? messageRich;
final dynamic messageRichParameters;
final String icon;
final String? icon;
final bool? shouldNotify;
final List<NextcloudNotificationsNotificationAction> actions;

13
packages/nextcloud/lib/src/nextcloud.openapi.g.dart

@ -1541,6 +1541,7 @@ NextcloudNotificationsNotification _$NextcloudNotificationsNotificationFromJson(
'messageRich',
'messageRichParameters',
'icon',
'shouldNotify',
'actions'
],
);
@ -1554,14 +1555,15 @@ NextcloudNotificationsNotification _$NextcloudNotificationsNotificationFromJson(
subject: json['subject'] as String,
message: json['message'] as String,
link: json['link'] as String,
subjectRich: json['subjectRich'] as String,
subjectRichParameters: json['subjectRichParameters'],
messageRich: json['messageRich'] as String,
messageRichParameters: json['messageRichParameters'],
icon: json['icon'] as String,
actions: (json['actions'] as List<dynamic>)
.map((e) => NextcloudNotificationsNotificationAction.fromJson(e as Map<String, dynamic>))
.toList(),
subjectRich: json['subjectRich'] as String?,
subjectRichParameters: json['subjectRichParameters'],
messageRich: json['messageRich'] as String?,
messageRichParameters: json['messageRichParameters'],
icon: json['icon'] as String?,
shouldNotify: json['shouldNotify'] as bool?,
);
}
@ -1581,6 +1583,7 @@ Map<String, dynamic> _$NextcloudNotificationsNotificationToJson(NextcloudNotific
'messageRich': instance.messageRich,
'messageRichParameters': instance.messageRichParameters,
'icon': instance.icon,
'shouldNotify': instance.shouldNotify,
'actions': instance.actions.map((e) => e.toJson()).toList(),
};

10
packages/nextcloud/lib/src/nextcloud.openapi.json

@ -2,7 +2,7 @@
"openapi": "3.1.0",
"info": {
"title": "Nextcloud",
"version": "26.0.0",
"version": "26.0.1",
"description": "All supported Nextcloud APIs in one",
"license": {
"name": "agpl",
@ -1274,11 +1274,6 @@
"subject",
"message",
"link",
"subjectRich",
"subjectRichParameters",
"messageRich",
"messageRichParameters",
"icon",
"actions"
],
"properties": {
@ -1324,6 +1319,9 @@
"icon": {
"type": "string"
},
"shouldNotify": {
"type": "boolean"
},
"actions": {
"type": "array",
"items": {

6
packages/nextcloud/test/core.dart

@ -27,8 +27,8 @@ Future run(final DockerImage image) async {
expect(status.installed, true);
expect(status.maintenance, false);
expect(status.needsDbUpgrade, false);
expect(status.version, startsWith('26.0.0'));
expect(status.versionstring, '26.0.0');
expect(status.version, startsWith('26.0.1'));
expect(status.versionstring, '26.0.1');
expect(status.edition, '');
expect(status.productname, 'Nextcloud');
expect(status.extendedSupport, false);
@ -37,7 +37,7 @@ Future run(final DockerImage image) async {
test('Get capabilities', () async {
final capabilities = await client.core.getCapabilities();
expect(capabilities.ocs.data.version.major.toString(), '26');
expect(capabilities.ocs.data.version.string, '26.0.0');
expect(capabilities.ocs.data.version.string, '26.0.1');
expect(capabilities.ocs.data.capabilities.theming!.name, 'Nextcloud');
expect(capabilities.ocs.data.capabilities.theming!.url, 'https://nextcloud.com');
expect(capabilities.ocs.data.capabilities.theming!.slogan, 'a safe home for all your data');

2
specs/core.json

@ -2,7 +2,7 @@
"openapi": "3.1.0",
"info": {
"title": "Core",
"version": "26.0.0",
"version": "26.0.1",
"description": "Core functionality of Nextcloud",
"license": {
"name": "agpl",

8
specs/notifications.json

@ -89,11 +89,6 @@
"subject",
"message",
"link",
"subjectRich",
"subjectRichParameters",
"messageRich",
"messageRichParameters",
"icon",
"actions"
],
"properties": {
@ -139,6 +134,9 @@
"icon": {
"type": "string"
},
"shouldNotify": {
"type": "boolean"
},
"actions": {
"type": "array",
"items": {

2
specs/templates/appinfo_core.xml

@ -4,6 +4,6 @@
<name>Core</name>
<summary>Core functionality of Nextcloud</summary>
<description><![CDATA[Core functionality of Nextcloud]]></description>
<version>26.0.0</version>
<version>26.0.1</version>
<licence>agpl</licence>
</info>

2
specs/templates/core.json

@ -2,7 +2,7 @@
"openapi": "3.1.0",
"info": {
"title": "Core",
"version": "26.0.0",
"version": "26.0.1",
"description": "Core functionality of Nextcloud",
"license": {
"name": "agpl",

40
specs/templates/notifications.json

@ -114,6 +114,46 @@
}
}
},
"/ocs/v2.php/apps/notifications/api/{apiVersion}/notifications/exists": {
"parameters": [
{
"name": "apiVersion",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"post": {
"operationId": "endpoint-confirmidsforuser-TODO",
"tags": [
"notifications"
],
"parameters": [
{
"name": "ids",
"in": "query",
"required": true,
"schema": {
"type": "array"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "string"
}
}
}
}
}
}
},
"/ocs/v2.php/apps/notifications/api/{apiVersion}/push": {
"parameters": [
{

2
tool/Dockerfile.dev

@ -1,4 +1,4 @@
FROM nextcloud:26.0.0
FROM nextcloud:26.0.1
WORKDIR /usr/src/nextcloud
RUN chown -R www-data:www-data .
USER www-data

Loading…
Cancel
Save