provokateurin / dart-nextcloud

A Nextcloud client for dart
Other
20 stars 15 forks source link

Dart Nextcloud Talk API not compatible with newest Talk API #60

Closed dajevtic closed 1 year ago

dajevtic commented 2 years ago

client.dart for talk API specifies the following baseUrl for talk management:

final _baseUrl = '$baseUrl/ocs/v2.php/apps/spreed/api/v1';

However, though this may be true for _guestManagement, _messageManagement it does not apply to _conversationManagement anymore. The correct baseUrl would be:

final _baseUrl4 = '$baseUrl/ocs/v2.php/apps/spreed/api/v4';
_conversationManagement = ConversationManagement(network, _baseUrl4);

Furthermore 2 members marked as required in Conversation have been removed, therefore they should be removed in order for the talk API to be intact again for new Nextcloud Talk version. The 2 members affected, that should be removed, are:

  /// The count of active users
  final int userCount;

  /// The number of active guests
  final int guestCount;

I tried this on my local machine and the Talk API basic functions work again. Hope it helps in keeping future compatibility.

provokateurin commented 2 years ago

Hey! If you submit a fix I'll merge it. I don't plan to work on this implementation anymore. See https://github.com/jld3103/dart-nextcloud/issues/55#issuecomment-1034703530 on how this library will live on.

provokateurin commented 2 years ago

Implementation of the latest Talk API is planned here: https://github.com/jld3103/nextcloud-neon/issues/1