File tree Expand file tree Collapse file tree 4 files changed +24
-3
lines changed Expand file tree Collapse file tree 4 files changed +24
-3
lines changed Original file line number Diff line number Diff line change 1+ ## 0.4.0
2+
3+ - BREAKING CHANGE: Changed the ` notify ` property of the ` Participant ` to allow for mentions only
4+
15## 0.3.1
26
37- Added explicit support for Android and iOS in pubspec.yaml
Original file line number Diff line number Diff line change @@ -517,7 +517,7 @@ class ChatBoxState extends State<ChatBox> {
517517 }
518518
519519 if (participant.notify != null ) {
520- result['notify' ] = participant.notify;
520+ result['notify' ] = participant.notify! . getValue () ;
521521 }
522522
523523 execute ('$variableName .setParticipant($userVariableName , ${json .encode (result )});' );
Original file line number Diff line number Diff line change @@ -20,13 +20,30 @@ extension ParticipantAccessString on ParticipantAccess {
2020 }
2121}
2222
23+ /// Possible values for participants' notifications
24+ enum ParticipantNotification { off, on , mentionsOnly }
25+
26+ extension ParticipantNotificationString on ParticipantNotification {
27+ /// Converts this enum's values to String.
28+ dynamic getValue () {
29+ switch (this ) {
30+ case ParticipantNotification .off:
31+ return false ;
32+ case ParticipantNotification .on :
33+ return true ;
34+ case ParticipantNotification .mentionsOnly:
35+ return 'MentionsOnly' ;
36+ }
37+ }
38+ }
39+
2340// Participants are users + options relative to this conversation
2441class Participant {
2542 final User user;
2643
2744 final ParticipantAccess ? access;
2845
29- final bool ? notify;
46+ final ParticipantNotification ? notify;
3047
3148 const Participant (this .user, {this .access, this .notify});
3249
Original file line number Diff line number Diff line change 11name : talkjs_flutter
22description : Official TalkJS SDK for Flutter
3- version : 0.3.1
3+ version : 0.4.0
44homepage : https://talkjs.com
55
66environment :
You can’t perform that action at this time.
0 commit comments