Skip to content

Commit

Permalink
Merge pull request #19 from xmtp/nmolnar/fix-group-chat-references
Browse files Browse the repository at this point in the history
Remove group chat references
  • Loading branch information
neekolas committed Sep 23, 2023
2 parents e13ea2f + 062e188 commit 8aae0a4
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions src/model/message-processor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,25 +76,6 @@ export async function process(
await db.attachments.add(messageAttachment);
}

if (XMTP.ContentTypeGroupChatTitleChanged.sameAs(contentType)) {
const titleChanged = content as XMTP.GroupChatTitleChanged;

await db.conversations.update(conversation, {
title: titleChanged.newTitle,
});
}

if (XMTP.ContentTypeGroupChatMemberAdded.sameAs(contentType)) {
const memberAdded = content as XMTP.GroupChatMemberAdded;

const groupMembers = new Set(conversation.groupMembers);
groupMembers.add(memberAdded.member);

await db.conversations.update(conversation, {
groupMembers: Array.from(groupMembers),
});
}

if (ContentTypeReaction.sameAs(message.contentType as XMTP.ContentTypeId)) {
const reaction: Reaction = message.content;

Expand Down

0 comments on commit 8aae0a4

Please sign in to comment.