Skip to content

Commit

Permalink
Support RCS for #361
Browse files Browse the repository at this point in the history
  • Loading branch information
ReagentX committed Nov 15, 2024
1 parent 526104f commit 162a375
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
13 changes: 8 additions & 5 deletions imessage-database/src/tables/messages/message.rs
Original file line number Diff line number Diff line change
Expand Up @@ -936,12 +936,15 @@ impl Message {

/// Determine the service the message was sent from, i.e. iMessage, SMS, IRC, etc.
pub fn service(&self) -> Service {
match self.service.as_deref() {
Some("iMessage") => Service::iMessage,
Some("SMS") => Service::SMS,
Some(service_name) => Service::Other(service_name),
None => Service::Unknown,
if let Some(service_name) = self.service.as_deref() {
return match service_name.trim() {
"iMessage" => Service::iMessage,
"SMS" => Service::SMS,
"rcs" => Service::SMS,
service_name => Service::Other(service_name),
};
}
Service::Unknown
}

/// Extract a blob of data that belongs to a single message from a given column
Expand Down
2 changes: 2 additions & 0 deletions imessage-database/src/tables/messages/models.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ pub enum Service<'a> {
iMessage,
/// A message sent as SMS
SMS,
/// A message sent as RCS
RCS,
/// Any other type of message
Other(&'a str),
/// Used when service field is not set
Expand Down
4 changes: 4 additions & 0 deletions imessage-exporter/src/exporters/resources/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ a[href^="#"] {
background-color: #65c466
}

.message .sent.rcs {
background-color: #65c466
}

.message .sent {
color: white;
border-radius: 25px;
Expand Down

0 comments on commit 162a375

Please sign in to comment.