chore: concat two statements
This commit is contained in:
parent
6c449466a5
commit
3a62097ec3
1 changed files with 3 additions and 4 deletions
|
@ -136,12 +136,11 @@ async fn encode_mastodon_payload(
|
||||||
|
|
||||||
// Ice Cubes and Mammoth expect notification_id to be an integer, but never use it.
|
// Ice Cubes and Mammoth expect notification_id to be an integer, but never use it.
|
||||||
if client.name == "IceCubesApp" || client.name == "Mammoth" {
|
if client.name == "IceCubesApp" || client.name == "Mammoth" {
|
||||||
let notification_id = object
|
let timestamp = object
|
||||||
.get("notification_id")
|
.get("notification_id")
|
||||||
.and_then(|id| id.as_str())
|
.and_then(|id| id.as_str())
|
||||||
.unwrap_or("0");
|
.map(|id| get_timestamp(id).unwrap_or_default())
|
||||||
|
.unwrap_or_default();
|
||||||
let timestamp = get_timestamp(notification_id).unwrap_or(0);
|
|
||||||
|
|
||||||
object.insert("notification_id".to_string(), timestamp.into());
|
object.insert("notification_id".to_string(), timestamp.into());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue