Skip to content

Commit da7f74e

Browse files
committed
test: Add timestamp to eg.streamMessage, eg.dmMessage
1 parent 6b467c8 commit da7f74e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test/example_data.dart

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ StreamMessage streamMessage({
152152
String? contentMarkdown,
153153
int? lastEditTimestamp,
154154
List<Reaction>? reactions,
155+
int? timestamp,
155156
List<String>? flags,
156157
}) {
157158
final effectiveStream = stream ?? _stream();
@@ -173,7 +174,7 @@ StreamMessage streamMessage({
173174
'id': id ?? 1234567, // TODO generate example IDs
174175
'last_edit_timestamp': lastEditTimestamp,
175176
'subject': topic ?? 'example topic',
176-
'timestamp': 1678139636,
177+
'timestamp': timestamp ?? 1678139636,
177178
'type': 'stream',
178179
});
179180
}
@@ -189,6 +190,7 @@ DmMessage dmMessage({
189190
String? content,
190191
String? contentMarkdown,
191192
int? lastEditTimestamp,
193+
int? timestamp,
192194
List<String>? flags,
193195
}) {
194196
assert(!to.any((user) => user.userId == from.userId));
@@ -204,7 +206,7 @@ DmMessage dmMessage({
204206
'id': id ?? 1234567, // TODO generate example IDs
205207
'last_edit_timestamp': lastEditTimestamp,
206208
'subject': '',
207-
'timestamp': 1678139636,
209+
'timestamp': timestamp ?? 1678139636,
208210
'type': 'private',
209211
});
210212
}

0 commit comments

Comments
 (0)