@@ -123,6 +123,51 @@ ZulipStream stream({
123
123
}
124
124
const _stream = stream;
125
125
126
+ Subscription subscription ({
127
+ required ZulipStream stream,
128
+ bool ? desktopNotifications,
129
+ bool ? emailNotifications,
130
+ bool ? wildcardMentionsNotify,
131
+ bool ? pushNotifications,
132
+ bool ? audibleNotifications,
133
+ bool ? pinToTop,
134
+ String ? emailAddress,
135
+ bool ? isMuted,
136
+ bool ? isWebPublic,
137
+ String ? color,
138
+ int ? streamPostPolicy,
139
+ int ? messageRetentionDays,
140
+ bool ? historyPublicToSubscribers,
141
+ int ? firstMessageId,
142
+ int ? streamWeeklyTraffic,
143
+ int ? canRemoveSubscribersGroupId,
144
+ }) {
145
+ return Subscription (
146
+ streamId: stream.streamId,
147
+ name: stream.name,
148
+ description: stream.description,
149
+ renderedDescription: stream.renderedDescription,
150
+ dateCreated: stream.dateCreated,
151
+ inviteOnly: stream.inviteOnly,
152
+ desktopNotifications: desktopNotifications ?? true ,
153
+ emailNotifications: emailNotifications ?? true ,
154
+ wildcardMentionsNotify: wildcardMentionsNotify ?? true ,
155
+ pushNotifications: pushNotifications ?? true ,
156
+ audibleNotifications: audibleNotifications ?? true ,
157
+ pinToTop: pinToTop ?? true ,
158
+ emailAddress
: emailAddress
?? '[email protected] ' ,
// TODO generate example data
159
+ isMuted: isMuted ?? true ,
160
+ isWebPublic: isWebPublic ?? true ,
161
+ color: color ?? '#e79ab5' ,
162
+ streamPostPolicy: streamPostPolicy ?? 1 ,
163
+ messageRetentionDays: messageRetentionDays ?? 365 ,
164
+ historyPublicToSubscribers: historyPublicToSubscribers ?? true ,
165
+ firstMessageId: firstMessageId ?? 123 , // TODO generate example data
166
+ streamWeeklyTraffic: streamWeeklyTraffic ?? 100 , // TODO generate example data
167
+ canRemoveSubscribersGroupId: canRemoveSubscribersGroupId ?? 123 // TODO generate example data
168
+ );
169
+ }
170
+
126
171
////////////////////////////////////////////////////////////////
127
172
// Messages, and pieces of messages.
128
173
//
0 commit comments