@@ -20,20 +20,41 @@ 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
46+ /// Deprecated. Use the notification property instead
2947 final bool ? notify;
3048
31- const Participant (this .user, {this .access, this .notify});
49+ final ParticipantNotification ? notification;
50+
51+ const Participant (this .user, {this .access, this .notify, this .notification});
3252
3353 Participant .of (Participant other)
3454 : user = User .of (other.user),
3555 access = other.access,
36- notify = other.notify;
56+ notify = other.notify,
57+ notification = other.notification;
3758
3859 bool operator == (Object other) {
3960 if (identical (this , other)) {
@@ -56,10 +77,14 @@ class Participant {
5677 return false ;
5778 }
5879
80+ if (notification != other.notification) {
81+ return false ;
82+ }
83+
5984 return true ;
6085 }
6186
62- int get hashCode => hashValues (user, access, notify);
87+ int get hashCode => hashValues (user, access, notify, notification );
6388}
6489
6590/// This represents a conversation that is about to be created, fetched, or
0 commit comments