@unicitylabs/sphere-sdk 0.6.10-dev.6 → 0.6.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3285,7 +3285,6 @@ declare class GroupChatModule {
3285
3285
  private handleGroupEvent;
3286
3286
  private handleMetadataEvent;
3287
3287
  private handleModerationEvent;
3288
- private updateMembersFromEvent;
3289
3288
  private updateAdminsFromEvent;
3290
3289
  private restoreJoinedGroups;
3291
3290
  fetchAvailableGroups(): Promise<GroupData[]>;
@@ -3285,7 +3285,6 @@ declare class GroupChatModule {
3285
3285
  private handleGroupEvent;
3286
3286
  private handleMetadataEvent;
3287
3287
  private handleModerationEvent;
3288
- private updateMembersFromEvent;
3289
3288
  private updateAdminsFromEvent;
3290
3289
  private restoreJoinedGroups;
3291
3290
  fetchAvailableGroups(): Promise<GroupData[]>;
@@ -12299,7 +12299,7 @@ var GroupChatModule = class {
12299
12299
  );
12300
12300
  this.trackSubscription(
12301
12301
  createNip29Filter({
12302
- kinds: [NIP29_KINDS.GROUP_METADATA, NIP29_KINDS.GROUP_MEMBERS, NIP29_KINDS.GROUP_ADMINS],
12302
+ kinds: [NIP29_KINDS.GROUP_METADATA, NIP29_KINDS.GROUP_ADMINS],
12303
12303
  "#d": groupIds
12304
12304
  }),
12305
12305
  { onEvent: (event) => this.handleMetadataEvent(event) }
@@ -12394,8 +12394,6 @@ var GroupChatModule = class {
12394
12394
  group.updatedAt = event.created_at * 1e3;
12395
12395
  this.groups.set(groupId, group);
12396
12396
  this.schedulePersist();
12397
- } else if (event.kind === NIP29_KINDS.GROUP_MEMBERS) {
12398
- this.updateMembersFromEvent(groupId, event);
12399
12397
  } else if (event.kind === NIP29_KINDS.GROUP_ADMINS) {
12400
12398
  this.updateAdminsFromEvent(groupId, event);
12401
12399
  }
@@ -12458,25 +12456,6 @@ var GroupChatModule = class {
12458
12456
  this.schedulePersist();
12459
12457
  }
12460
12458
  }
12461
- updateMembersFromEvent(groupId, event) {
12462
- const pTags = event.tags.filter((t) => t[0] === "p");
12463
- const existingMembers = this.members.get(groupId) || [];
12464
- for (const tag of pTags) {
12465
- const pubkey = tag[1];
12466
- const roleFromTag = tag[3];
12467
- const existing = existingMembers.find((m) => m.pubkey === pubkey);
12468
- const role = roleFromTag || existing?.role || GroupRole.MEMBER;
12469
- const member = {
12470
- pubkey,
12471
- groupId,
12472
- role,
12473
- nametag: existing?.nametag,
12474
- joinedAt: existing?.joinedAt || event.created_at * 1e3
12475
- };
12476
- this.saveMemberToMemory(member);
12477
- }
12478
- this.schedulePersist();
12479
- }
12480
12459
  updateAdminsFromEvent(groupId, event) {
12481
12460
  const pTags = event.tags.filter((t) => t[0] === "p");
12482
12461
  const existingMembers = this.members.get(groupId) || [];