Drop story replies from group timeline
This commit is contained in:
parent
e5ba00b798
commit
774246b6e2
10 changed files with 358 additions and 33 deletions
|
@ -1177,6 +1177,7 @@ async function getTotalUnreadForConversation(
|
|||
|
||||
async function getUnreadByConversationAndMarkRead(options: {
|
||||
conversationId: string;
|
||||
isGroup?: boolean;
|
||||
newestUnreadAt: number;
|
||||
readAt?: number;
|
||||
storyId?: UUIDStringType;
|
||||
|
@ -1228,12 +1229,14 @@ function handleMessageJSON(
|
|||
async function getOlderMessagesByConversation(
|
||||
conversationId: string,
|
||||
{
|
||||
isGroup,
|
||||
limit = 100,
|
||||
messageId,
|
||||
receivedAt = Number.MAX_VALUE,
|
||||
sentAt = Number.MAX_VALUE,
|
||||
storyId,
|
||||
}: {
|
||||
isGroup?: boolean;
|
||||
limit?: number;
|
||||
messageId?: string;
|
||||
receivedAt?: number;
|
||||
|
@ -1244,6 +1247,7 @@ async function getOlderMessagesByConversation(
|
|||
const messages = await channels.getOlderMessagesByConversation(
|
||||
conversationId,
|
||||
{
|
||||
isGroup,
|
||||
limit,
|
||||
receivedAt,
|
||||
sentAt,
|
||||
|
@ -1267,11 +1271,13 @@ async function getOlderStories(options: {
|
|||
async function getNewerMessagesByConversation(
|
||||
conversationId: string,
|
||||
{
|
||||
isGroup,
|
||||
limit = 100,
|
||||
receivedAt = 0,
|
||||
sentAt = 0,
|
||||
storyId,
|
||||
}: {
|
||||
isGroup?: boolean;
|
||||
limit?: number;
|
||||
receivedAt?: number;
|
||||
sentAt?: number;
|
||||
|
@ -1281,6 +1287,7 @@ async function getNewerMessagesByConversation(
|
|||
const messages = await channels.getNewerMessagesByConversation(
|
||||
conversationId,
|
||||
{
|
||||
isGroup,
|
||||
limit,
|
||||
receivedAt,
|
||||
sentAt,
|
||||
|
@ -1292,14 +1299,17 @@ async function getNewerMessagesByConversation(
|
|||
}
|
||||
async function getConversationMessageStats({
|
||||
conversationId,
|
||||
isGroup,
|
||||
ourUuid,
|
||||
}: {
|
||||
conversationId: string;
|
||||
isGroup?: boolean;
|
||||
ourUuid: UUIDStringType;
|
||||
}): Promise<ConversationMessageStatsType> {
|
||||
const { preview, activity, hasUserInitiatedMessages } =
|
||||
await channels.getConversationMessageStats({
|
||||
conversationId,
|
||||
isGroup,
|
||||
ourUuid,
|
||||
});
|
||||
|
||||
|
@ -1318,11 +1328,13 @@ async function getLastConversationMessage({
|
|||
}
|
||||
async function getMessageMetricsForConversation(
|
||||
conversationId: string,
|
||||
storyId?: UUIDStringType
|
||||
storyId?: UUIDStringType,
|
||||
isGroup?: boolean
|
||||
) {
|
||||
const result = await channels.getMessageMetricsForConversation(
|
||||
conversationId,
|
||||
storyId
|
||||
storyId,
|
||||
isGroup
|
||||
);
|
||||
|
||||
return result;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue