File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change 11## unreleased
22- Update follower and following counts on the feed state when receiving follow websocket events.
3+ - Fix FeedsReactionData id for updating reactions in the feed state.
34
45## 0.3.1
56- Update API client with renaming ` addReaction ` to ` addActivityReaction ` and ` deleteReaction ` to ` deleteActivityReaction ` .
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ class FeedsReactionData with _$FeedsReactionData {
1414 /// Creates a new [FeedsReactionData] instance.
1515 const FeedsReactionData ({
1616 required this .activityId,
17+ this .commentId,
1718 required this .createdAt,
1819 required this .type,
1920 required this .updatedAt,
@@ -25,6 +26,8 @@ class FeedsReactionData with _$FeedsReactionData {
2526 @override
2627 final String activityId;
2728
29+ final String ? commentId;
30+
2831 /// The date and time when the reaction was created.
2932 @override
3033 final DateTime createdAt;
@@ -46,7 +49,8 @@ class FeedsReactionData with _$FeedsReactionData {
4649 final Map <String , Object ?>? custom;
4750
4851 /// Unique identifier for the reaction, generated from the activity ID and user ID.
49- String get id => '$activityId ${user .id }' ;
52+ String get id =>
53+ '${user .id }-$type ${commentId == null ? '' : '-$commentId ' }-$activityId ' ;
5054}
5155
5256/// Extension function to convert a [FeedsReactionResponse] to a [FeedsReactionData] model.
@@ -55,6 +59,7 @@ extension FeedsReactionResponseMapper on FeedsReactionResponse {
5559 FeedsReactionData toModel () {
5660 return FeedsReactionData (
5761 activityId: activityId,
62+ commentId: commentId,
5863 createdAt: createdAt,
5964 type: type,
6065 updatedAt: updatedAt,
You can’t perform that action at this time.
0 commit comments