updateActivity static method

Future<GetSocialActivity> updateActivity(
  1. String id,
  2. ActivityContent content
)

Update existing activity with provided content.

id Activity id to update. content New content.

Implementation

static Future<GetSocialActivity> updateActivity(
    String id, ActivityContent content) {
  Map<String, dynamic> updateActivityBody = {
    'target': id,
    'content': content.toJSON()
  };
  return NativeBridge.async(
          'Communities.updateActivity', jsonEncode(updateActivityBody))
      .then((result) => GetSocialActivity.fromJSON(jsonDecode(result)));
}