mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-02 14:35:21 +00:00
Fix crash
This commit is contained in:
parent
21fab09d6c
commit
c446ba6e58
@ -97,8 +97,8 @@ object SessionMetaProtocol {
|
|||||||
* Should be invoked for the recipient's master device.
|
* Should be invoked for the recipient's master device.
|
||||||
*/
|
*/
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
fun shouldSendTypingIndicator(recipient: Recipient, context: Context): Boolean {
|
fun shouldSendTypingIndicator(recipient: Recipient?, context: Context): Boolean {
|
||||||
if (recipient.isGroupRecipient) { return false }
|
if (recipient == null || recipient.isGroupRecipient) { return false }
|
||||||
val threadID = DatabaseFactory.getThreadDatabase(context).getThreadIdFor(recipient)
|
val threadID = DatabaseFactory.getThreadDatabase(context).getThreadIdFor(recipient)
|
||||||
return DatabaseFactory.getLokiThreadDatabase(context).getFriendRequestStatus(threadID) == LokiThreadFriendRequestStatus.FRIENDS
|
return DatabaseFactory.getLokiThreadDatabase(context).getFriendRequestStatus(threadID) == LokiThreadFriendRequestStatus.FRIENDS
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user