mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-26 09:47:43 +00:00
Disable typing indicators in group chats
This commit is contained in:
parent
88403024eb
commit
67b7a1d8c2
@ -314,6 +314,7 @@ public class PushDecryptJob extends BaseJob implements InjectableType {
|
|||||||
handleProfileKey(content, message);
|
handleProfileKey(content, message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Loki - This doesn't get invoked for group chats
|
||||||
if (content.isNeedsReceipt()) {
|
if (content.isNeedsReceipt()) {
|
||||||
handleNeedsDeliveryReceipt(content, message);
|
handleNeedsDeliveryReceipt(content, message);
|
||||||
}
|
}
|
||||||
|
@ -96,9 +96,12 @@ public class TypingSendJob extends BaseJob implements InjectableType {
|
|||||||
List<Optional<UnidentifiedAccessPair>> unidentifiedAccess = Stream.of(recipients).map(r -> UnidentifiedAccessUtil.getAccessFor(context, r)).toList();
|
List<Optional<UnidentifiedAccessPair>> unidentifiedAccess = Stream.of(recipients).map(r -> UnidentifiedAccessUtil.getAccessFor(context, r)).toList();
|
||||||
SignalServiceTypingMessage typingMessage = new SignalServiceTypingMessage(typing ? Action.STARTED : Action.STOPPED, System.currentTimeMillis(), groupId);
|
SignalServiceTypingMessage typingMessage = new SignalServiceTypingMessage(typing ? Action.STARTED : Action.STOPPED, System.currentTimeMillis(), groupId);
|
||||||
|
|
||||||
|
// Loki - Don't send typing indicators in group chats
|
||||||
|
if (!recipient.isGroupRecipient()) {
|
||||||
// TODO: Message ID
|
// TODO: Message ID
|
||||||
messageSender.sendTyping(0, addresses, unidentifiedAccess, typingMessage);
|
messageSender.sendTyping(0, addresses, unidentifiedAccess, typingMessage);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCanceled() {
|
public void onCanceled() {
|
||||||
|
@ -86,6 +86,7 @@ public class MarkReadReceiver extends BroadcastReceiver {
|
|||||||
.collect(Collectors.groupingBy(SyncMessageId::getAddress));
|
.collect(Collectors.groupingBy(SyncMessageId::getAddress));
|
||||||
|
|
||||||
for (Address address : addressMap.keySet()) {
|
for (Address address : addressMap.keySet()) {
|
||||||
|
// Loki - This also prevents read receipts from being sent in group chats as they don't maintain a friend request status
|
||||||
LokiThreadDatabase lokiThreadDatabase = DatabaseFactory.getLokiThreadDatabase(context);
|
LokiThreadDatabase lokiThreadDatabase = DatabaseFactory.getLokiThreadDatabase(context);
|
||||||
long threadID = lokiThreadDatabase.getThreadID(address.serialize());
|
long threadID = lokiThreadDatabase.getThreadID(address.serialize());
|
||||||
LokiThreadFriendRequestStatus friendRequestStatus = lokiThreadDatabase.getFriendRequestStatus(threadID);
|
LokiThreadFriendRequestStatus friendRequestStatus = lokiThreadDatabase.getFriendRequestStatus(threadID);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user