-
Notifications
You must be signed in to change notification settings - Fork 108
/
messages.rs
699 lines (652 loc) · 24.2 KB
/
messages.rs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
use std::{collections::HashMap, vec};
use chrono::{naive::NaiveDateTime, offset::Local, DateTime, Datelike, TimeZone, Timelike, Utc};
use rusqlite::{Connection, Result, Row, Statement};
use crate::{
tables::table::{
Cacheable, Diagnostic, Table, CHAT_MESSAGE_JOIN, MESSAGE, MESSAGE_ATTACHMENT_JOIN,
},
util::output::processing,
ApplePay, Reaction, Variant,
};
const ATTACHMENT_CHAR: char = '\u{FFFC}';
const APP_CHAR: char = '\u{FFFD}';
const REPLACEMENT_CHARS: [char; 2] = [ATTACHMENT_CHAR, APP_CHAR];
#[derive(Debug)]
pub enum MessageType {
/// A normal message not associated with any others
Normal(Variant),
/// A message that has replies
Thread(Variant),
/// A message that is a reply to another message
Reply(Variant),
}
#[derive(Debug, PartialEq)]
pub enum BubbleType<'a> {
/// A normal text message
Text(&'a str),
/// An attachment
Attachment,
/// An app integration
App,
}
#[derive(Debug)]
#[allow(non_snake_case)]
pub struct Message {
pub rowid: i32,
pub guid: String,
pub text: Option<String>,
pub replace: i32,
pub service_center: Option<String>,
pub handle_id: i32,
pub subject: Option<String>,
pub country: Option<String>,
pub attributedBody: Option<Vec<u8>>, // Field name comes from from table
pub version: i32,
pub r#type: i32, // Field name comes from from table
pub service: String,
pub account: Option<String>,
pub account_guid: Option<String>,
pub error: i32,
pub date: i64,
pub date_read: i64,
pub date_delivered: i64,
pub is_delivered: bool,
pub is_finished: bool,
pub is_emote: bool,
pub is_from_me: bool,
pub is_empty: bool,
pub is_delayed: bool,
pub is_auto_reply: bool,
pub is_prepared: bool,
pub is_read: bool,
pub is_system_message: bool,
pub is_sent: bool,
pub has_dd_results: i32,
pub is_service_message: bool,
pub is_forward: bool,
pub was_downgraded: i32,
pub is_archive: bool,
pub cache_has_attachments: i32,
pub cache_roomnames: Option<String>,
pub was_data_detected: i32,
pub was_deduplicated: i32,
pub is_audio_message: bool,
pub is_played: bool,
pub date_played: i64,
pub item_type: i32,
pub other_handle: i32,
pub group_title: Option<String>,
pub group_action_type: i32,
pub share_status: i32,
pub share_direction: i32,
pub is_expirable: bool,
pub expire_state: i32,
pub message_action_type: i32,
pub message_source: i32,
pub associated_message_guid: Option<String>,
pub balloon_bundle_id: Option<String>,
pub payload_data: Option<Vec<u8>>,
pub associated_message_type: i32,
pub expressive_send_style_id: Option<String>,
pub associated_message_range_location: i32,
pub associated_message_range_length: i32,
pub time_expressive_send_played: i64,
pub message_summary_info: Option<Vec<u8>>,
pub ck_sync_state: i32,
pub ck_record_id: Option<String>,
pub ck_record_change_tag: Option<String>,
pub destination_caller_id: Option<String>,
pub sr_ck_sync_state: i32,
pub sr_ck_record_id: Option<String>,
pub sr_ck_record_change_tag: Option<String>,
pub is_corrupt: bool,
pub reply_to_guid: Option<String>,
pub sort_id: i32,
pub is_spam: bool,
pub has_unseen_mention: i32,
pub thread_originator_guid: Option<String>,
pub thread_originator_part: Option<String>,
pub syndication_ranges: Option<String>,
pub was_delivered_quietly: i32,
pub did_notify_recipient: i32,
pub synced_syndication_ranges: Option<String>,
pub chat_id: Option<i32>,
pub num_attachments: i32,
pub num_replies: i32,
offset: i64,
}
impl Table for Message {
fn from_row(row: &Row) -> Result<Message> {
Ok(Message {
rowid: row.get(0)?,
guid: row.get(1)?,
text: row.get(2)?,
replace: row.get(3)?,
service_center: row.get(4)?,
handle_id: row.get(5)?,
subject: row.get(6)?,
country: row.get(7)?,
attributedBody: row.get(8)?,
version: row.get(9)?,
r#type: row.get(10)?,
service: row.get(11)?,
account: row.get(12)?,
account_guid: row.get(13)?,
error: row.get(14)?,
date: row.get(15)?,
date_read: row.get(16)?,
date_delivered: row.get(17)?,
is_delivered: row.get(18)?,
is_finished: row.get(19)?,
is_emote: row.get(20)?,
is_from_me: row.get(21)?,
is_empty: row.get(22)?,
is_delayed: row.get(23)?,
is_auto_reply: row.get(24)?,
is_prepared: row.get(25)?,
is_read: row.get(26)?,
is_system_message: row.get(27)?,
is_sent: row.get(28)?,
has_dd_results: row.get(29)?,
is_service_message: row.get(30)?,
is_forward: row.get(31)?,
was_downgraded: row.get(32)?,
is_archive: row.get(33)?,
cache_has_attachments: row.get(34)?,
cache_roomnames: row.get(35)?,
was_data_detected: row.get(36)?,
was_deduplicated: row.get(37)?,
is_audio_message: row.get(38)?,
is_played: row.get(39)?,
date_played: row.get(40)?,
item_type: row.get(41)?,
other_handle: row.get(42)?,
group_title: row.get(43)?,
group_action_type: row.get(44)?,
share_status: row.get(45)?,
share_direction: row.get(46)?,
is_expirable: row.get(47)?,
expire_state: row.get(48)?,
message_action_type: row.get(49)?,
message_source: row.get(50)?,
associated_message_guid: row.get(51)?,
balloon_bundle_id: row.get(52)?,
payload_data: row.get(53)?,
associated_message_type: row.get(54)?,
expressive_send_style_id: row.get(55)?,
associated_message_range_location: row.get(56)?,
associated_message_range_length: row.get(57)?,
time_expressive_send_played: row.get(58)?,
message_summary_info: row.get(59)?,
ck_sync_state: row.get(60)?,
ck_record_id: row.get(61)?,
ck_record_change_tag: row.get(62)?,
destination_caller_id: row.get(63)?,
sr_ck_sync_state: row.get(64)?,
sr_ck_record_id: row.get(65)?,
sr_ck_record_change_tag: row.get(66)?,
is_corrupt: row.get(67)?,
reply_to_guid: row.get(68)?,
sort_id: row.get(69)?,
is_spam: row.get(70)?,
has_unseen_mention: row.get(71)?,
thread_originator_guid: row.get(72)?,
thread_originator_part: row.get(73)?,
syndication_ranges: row.get(74)?,
was_delivered_quietly: row.get(75)?,
did_notify_recipient: row.get(76)?,
synced_syndication_ranges: row.get(77)?,
chat_id: row.get(78)?,
num_attachments: row.get(79)?,
num_replies: row.get(80)?,
// TODO: Calculate once, not for each object
offset: Utc.ymd(2001, 1, 1).and_hms(0, 0, 0).timestamp(),
})
}
fn get(db: &Connection) -> Statement {
db.prepare(&format!(
"SELECT
m.*,
c.chat_id,
(SELECT COUNT(*) FROM {MESSAGE_ATTACHMENT_JOIN} a WHERE m.ROWID = a.message_id) as num_attachments,
(SELECT COUNT(*) FROM {MESSAGE} m2 WHERE m2.thread_originator_guid = m.guid) as num_replies
FROM
message as m
LEFT JOIN {CHAT_MESSAGE_JOIN} as c ON m.ROWID = c.message_id
ORDER BY
m.ROWID;
"
))
.unwrap()
}
}
impl Diagnostic for Message {
/// Emit diagnotsic data for the Messages table
///
/// # Example:
///
/// ```
/// use imessage_database::util::dirs::default_db_path;
/// use imessage_database::tables::table::{Diagnostic, get_connection};
/// use imessage_database::tables::messages::Message;
///
/// let db_path = default_db_path();
/// let conn = get_connection(&db_path);
/// Message::run_diagnostic(&conn);
/// ```
fn run_diagnostic(db: &Connection) {
processing();
let mut messages_without_chat = db
.prepare(&format!("SELECT COUNT(m.rowid) from {MESSAGE} as m LEFT JOIN {CHAT_MESSAGE_JOIN} as c ON m.rowid = c.message_id WHERE c.chat_id is NULL ORDER BY m.ROWID"))
.unwrap();
let num_dangling: Option<i32> = messages_without_chat
.query_row([], |r| r.get(0))
.unwrap_or(None);
if let Some(dangling) = num_dangling {
println!("\rMessages not associated with a chat: {dangling}");
}
}
}
impl Cacheable for Message {
type K = String;
type V = Vec<String>;
/// Used for reactions that do not exist in a foreign key table
fn cache(db: &Connection) -> std::collections::HashMap<Self::K, Self::V> {
// Create cache for user IDs
let mut map: HashMap<Self::K, Self::V> = HashMap::new();
// Create query
let mut statement = db.prepare(&format!(
"SELECT
m.*,
c.chat_id,
(SELECT COUNT(*) FROM {MESSAGE_ATTACHMENT_JOIN} a WHERE m.ROWID = a.message_id) as num_attachments,
(SELECT COUNT(*) FROM {MESSAGE} m2 WHERE m2.thread_originator_guid = m.guid) as num_replies
FROM
message as m
LEFT JOIN {CHAT_MESSAGE_JOIN} as c ON m.ROWID = c.message_id
WHERE m.associated_message_guid NOT NULL
"
))
.unwrap();
// Execute query to build the Handles
let messages = statement
.query_map([], |row| Ok(Message::from_row(row)))
.unwrap();
// Iterate over the messages and update the map
for reaction in messages {
let reaction = reaction.unwrap().unwrap();
if let Variant::Reaction(_) = reaction.variant() {
match reaction.clean_associated_guid() {
Some((_, reaction_target_guid)) => match map.get_mut(reaction_target_guid) {
Some(reactions) => {
reactions.push(reaction.guid);
}
None => {
map.insert(reaction_target_guid.to_string(), vec![reaction.guid]);
}
},
None => (),
}
}
}
map
}
}
impl Message {
/// Get a vector of string slices of the message's components
///
/// If the message has attachments, there will be one `U+FFFC` character
/// for each attachment and one `\u{FFFD}` for app messages that we need
/// to format
///
/// https://www.fileformat.info/info/unicode/char/fffc/index.htm
/// https://www.fileformat.info/info/unicode/char/fffd/index.htm
///
pub fn body(&self) -> Vec<BubbleType> {
match &self.text {
// Attachment: "\u{FFFC}"
// Replacement: "\u{FFFD}"
Some(text) => {
let mut out_v = vec![];
let mut start: usize = 0;
let mut end: usize = 0;
for (idx, char) in text.char_indices() {
if REPLACEMENT_CHARS.contains(&char) {
if start < end {
out_v.push(BubbleType::Text(text[start..idx].trim()));
}
start = idx + 1;
end = idx;
match char {
ATTACHMENT_CHAR => out_v.push(BubbleType::Attachment),
APP_CHAR => out_v.push(BubbleType::App),
_ => {}
};
} else {
if start > end {
start = idx;
}
end = idx;
}
}
if start < end && start < text.len() {
out_v.push(BubbleType::Text(text[start..].trim()));
}
out_v
}
None => vec![],
}
}
fn get_local_time(&self, date_stamp: &i64) -> DateTime<Local> {
let utc_stamp = NaiveDateTime::from_timestamp((date_stamp / 1000000000) + self.offset, 0);
let local_time = Local.from_utc_datetime(&utc_stamp);
Local
.ymd(local_time.year(), local_time.month(), local_time.day())
.and_hms(local_time.hour(), local_time.minute(), local_time.second())
}
pub fn date(&self) -> DateTime<Local> {
self.get_local_time(&self.date)
}
pub fn date_delivered(&self) -> DateTime<Local> {
self.get_local_time(&self.date_delivered)
}
pub fn date_read(&self) -> DateTime<Local> {
self.get_local_time(&self.date_read)
}
pub fn is_reply(&self) -> bool {
self.thread_originator_guid.is_some()
}
fn has_attachments(&self) -> bool {
self.num_attachments > 0
}
fn has_replies(&self) -> bool {
self.num_replies > 0
}
/// Get the index of the part of a message a reply is pointing to
pub fn get_reply_index(&self) -> i32 {
// str::parse::<i32>()
if let Some(parts) = &self.thread_originator_part {
return match parts.split(':').next() {
Some(part) => str::parse::<i32>(part).unwrap(),
None => 0,
}
}
0
}
fn clean_associated_guid(&self) -> Option<(i32, &str)> {
// TODO: Test that the GUID length is correct!
if let Some(guid) = &self.associated_message_guid {
if guid.starts_with("p:") {
let mut split = guid.split('/');
let index_str = split.next();
let message_id = split.next();
let index = str::parse::<i32>(&index_str.unwrap().replace("p:", "")).unwrap_or(0);
return Some((index, message_id.unwrap()));
} else if guid.starts_with("bp:") {
return Some((0, &guid[3..guid.len()]));
} else {
return Some((0, guid.as_str()));
}
}
None
}
fn reaction_index(&self) -> i32 {
match self.clean_associated_guid() {
Some((x, _)) => x,
None => 0,
}
}
pub fn get_reactions<'a>(
&self,
db: &Connection,
reactions: &'a HashMap<String, Vec<String>>,
) -> Vec<Self> {
let mut out_v = Vec::new();
if let Some(rxs) = reactions.get(&self.guid) {
let filter: Vec<String> = rxs.iter().map(|guid| format!("\"{}\"", guid)).collect();
// Create query
let mut statement = db.prepare(&format!(
"SELECT
m.*,
c.chat_id,
(SELECT COUNT(*) FROM {MESSAGE_ATTACHMENT_JOIN} a WHERE m.ROWID = a.message_id) as num_attachments,
(SELECT COUNT(*) FROM {MESSAGE} m2 WHERE m2.thread_originator_guid = m.guid) as num_replies
FROM
message as m
LEFT JOIN {CHAT_MESSAGE_JOIN} as c ON m.ROWID = c.message_id
WHERE m.guid IN ({})
ORDER BY
m.ROWID;
",
filter.join(",")
)).unwrap();
// Execute query to build the Handles
let messages = statement
.query_map([], |row| Ok(Message::from_row(row)))
.unwrap();
for message in messages {
let msg = message.unwrap().unwrap();
out_v.push(msg);
}
}
out_v
}
pub fn get_replies(&self, db: &Connection) -> Vec<Self> {
let mut out_v = vec![];
// No need to hit the DB if we know we don't have replies
if self.has_replies() {
// TODO: reactions count + get_reactions_from_message, same as how replies work now
let mut statement = db.prepare(&format!(
"SELECT
m.*,
c.chat_id,
(SELECT COUNT(*) FROM {MESSAGE_ATTACHMENT_JOIN} a WHERE m.ROWID = a.message_id) as num_attachments,
(SELECT COUNT(*) FROM {MESSAGE} m2 WHERE m2.thread_originator_guid = m.guid) as num_replies
FROM
message as m
LEFT JOIN {CHAT_MESSAGE_JOIN} as c ON m.ROWID = c.message_id
WHERE m.thread_originator_guid = \"{}\"
ORDER BY
m.ROWID;
", self.guid
))
.unwrap();
let iter = statement
.query_map([], |row| Ok(Message::from_row(row)))
.unwrap();
for message in iter {
let m = message.unwrap().unwrap();
out_v.push(m)
}
}
out_v
}
pub fn variant(&self) -> Variant {
match self.associated_message_type {
// TODO: reaction index
// Normal message
0 => Variant::Normal,
// Apple Pay
2 => Variant::ApplePay(ApplePay::Send(self.text.as_ref().unwrap().to_owned())),
3 => Variant::ApplePay(ApplePay::Recieve(self.text.as_ref().unwrap().to_owned())),
// Reactions
2000 => Variant::Reaction(Reaction::Loved(self.reaction_index(), true)),
2001 => Variant::Reaction(Reaction::Liked(self.reaction_index(), true)),
2002 => Variant::Reaction(Reaction::Disliked(self.reaction_index(), true)),
2003 => Variant::Reaction(Reaction::Laughed(self.reaction_index(), true)),
2004 => Variant::Reaction(Reaction::Emphasized(self.reaction_index(), true)),
2005 => Variant::Reaction(Reaction::Questioned(self.reaction_index(), true)),
3000 => Variant::Reaction(Reaction::Loved(self.reaction_index(), false)),
3001 => Variant::Reaction(Reaction::Liked(self.reaction_index(), false)),
3002 => Variant::Reaction(Reaction::Disliked(self.reaction_index(), false)),
3003 => Variant::Reaction(Reaction::Laughed(self.reaction_index(), false)),
3004 => Variant::Reaction(Reaction::Emphasized(self.reaction_index(), false)),
3005 => Variant::Reaction(Reaction::Questioned(self.reaction_index(), false)),
// Unknown
x => Variant::Unknown(x),
}
}
pub fn case(&self) -> MessageType {
// TODO: Messages with reactions are not replies,
// even though they are categorized as replies if the reaction is to a message that is a reply
if self.is_reply() {
MessageType::Reply(self.variant())
} else if self.has_replies() {
MessageType::Thread(self.variant())
} else {
MessageType::Normal(self.variant())
}
}
}
#[cfg(test)]
mod tests {
use crate::tables::messages::{BubbleType, Message};
fn blank() -> Message {
Message {
rowid: i32::default(),
guid: String::default(),
text: None,
replace: i32::default(),
service_center: None,
handle_id: i32::default(),
subject: None,
country: None,
attributedBody: None,
version: i32::default(),
r#type: i32::default(),
service: String::default(),
account: None,
account_guid: None,
error: i32::default(),
date: i64::default(),
date_read: i64::default(),
date_delivered: i64::default(),
is_delivered: false,
is_finished: false,
is_emote: false,
is_from_me: false,
is_empty: false,
is_delayed: false,
is_auto_reply: false,
is_prepared: false,
is_read: false,
is_system_message: false,
is_sent: false,
has_dd_results: i32::default(),
is_service_message: false,
is_forward: false,
was_downgraded: i32::default(),
is_archive: false,
cache_has_attachments: i32::default(),
cache_roomnames: None,
was_data_detected: i32::default(),
was_deduplicated: i32::default(),
is_audio_message: false,
is_played: false,
date_played: i64::default(),
item_type: i32::default(),
other_handle: i32::default(),
group_title: None,
group_action_type: i32::default(),
share_status: i32::default(),
share_direction: i32::default(),
is_expirable: false,
expire_state: i32::default(),
message_action_type: i32::default(),
message_source: i32::default(),
associated_message_guid: None,
balloon_bundle_id: None,
payload_data: None,
associated_message_type: i32::default(),
expressive_send_style_id: None,
associated_message_range_location: i32::default(),
associated_message_range_length: i32::default(),
time_expressive_send_played: i64::default(),
message_summary_info: None,
ck_sync_state: i32::default(),
ck_record_id: None,
ck_record_change_tag: None,
destination_caller_id: None,
sr_ck_sync_state: i32::default(),
sr_ck_record_id: None,
sr_ck_record_change_tag: None,
is_corrupt: false,
reply_to_guid: None,
sort_id: i32::default(),
is_spam: false,
has_unseen_mention: i32::default(),
thread_originator_guid: None,
thread_originator_part: None,
syndication_ranges: None,
was_delivered_quietly: i32::default(),
did_notify_recipient: i32::default(),
synced_syndication_ranges: None,
chat_id: None,
num_attachments: 0,
num_replies: 0,
offset: 0,
}
}
#[test]
fn can_gen_message() {
let m = blank();
}
#[test]
fn can_get_message_body_text_only() {
let mut m = blank();
m.text = Some("Hello world".to_string());
assert_eq!(m.body(), vec![BubbleType::Text("Hello world")]);
}
#[test]
fn can_get_message_body_attachment_text() {
let mut m = blank();
m.text = Some("\u{FFFC}Hello world".to_string());
assert_eq!(
m.body(),
vec![BubbleType::Attachment, BubbleType::Text("Hello world")]
);
}
#[test]
fn can_get_message_body_app_text() {
let mut m = blank();
m.text = Some("\u{FFFD}Hello world".to_string());
assert_eq!(
m.body(),
vec![BubbleType::App, BubbleType::Text("Hello world")]
);
}
#[test]
fn can_get_message_body_app_attachment_text_mixed_start_text() {
let mut m = blank();
m.text = Some("One\u{FFFD}\u{FFFC}Two\u{FFFC}Three\u{FFFC}four".to_string());
assert_eq!(
m.body(),
vec![
BubbleType::Text("One"),
BubbleType::App,
BubbleType::Attachment,
BubbleType::Text("Two"),
BubbleType::Attachment,
BubbleType::Text("Three"),
BubbleType::Attachment,
BubbleType::Text("four")
]
);
}
#[test]
fn can_get_message_body_app_attachment_text_mixed_start_app() {
let mut m = blank();
m.text = Some("\u{FFFD}\u{FFFC}Two\u{FFFC}Three\u{FFFC}".to_string());
assert_eq!(
m.body(),
vec![
BubbleType::App,
BubbleType::Attachment,
BubbleType::Text("Two"),
BubbleType::Attachment,
BubbleType::Text("Three"),
BubbleType::Attachment
]
);
}
}