Skip to content

Commit

Permalink
Ensure OPEN_MESSAGE_EXTRA_CONTACT_KEY is always set
Browse files Browse the repository at this point in the history
The `openMessageIntent` function is modified to always include the `OPEN_MESSAGE_EXTRA_CONTACT_KEY` in the intent, ensuring that the message recipient is always specified when opening the message activity.
  • Loading branch information
jamesarich committed Nov 4, 2024
1 parent 3d71940 commit 14eb53d
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -189,12 +189,10 @@ class MeshServiceNotifications(
)
}

private fun openMessageIntent(contactKey: String? = null): PendingIntent {
private fun openMessageIntent(contactKey: String): PendingIntent {
val intent = Intent(context, MainActivity::class.java)
intent.action = OPEN_MESSAGE_ACTION
contactKey?.let {
intent.putExtra(OPEN_MESSAGE_EXTRA_CONTACT_KEY, it)
}
intent.putExtra(OPEN_MESSAGE_EXTRA_CONTACT_KEY, contactKey)
val pendingIntent = PendingIntent.getActivity(
context,
0,
Expand Down

0 comments on commit 14eb53d

Please sign in to comment.