@openpeepshq/core 0.4.10 → 0.4.11
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { notificationAll, } from '@openpeepshq/common/types';
|
|
2
2
|
import { maybeCreateNotification } from '@openpeepshq/core/notifications';
|
|
3
|
-
import { getProfileAvatar, profileName } from '@openpeepshq/common/lib';
|
|
3
|
+
import { getProfileAvatar, isConversationLeavePost, profileName, } from '@openpeepshq/common/lib';
|
|
4
4
|
import { getConversationByEnd } from '@openpeepshq/core/posts';
|
|
5
5
|
import { communityConfig } from '../../../config/index.js';
|
|
6
6
|
import { PUSH_INVALIDATE } from '../../pushInvalidation.js';
|
|
@@ -9,6 +9,10 @@ const eventHandler = async (data) => {
|
|
|
9
9
|
if (post.data?.type === 'event')
|
|
10
10
|
return;
|
|
11
11
|
if (post.visibility === 'direct' && post.audience) {
|
|
12
|
+
// A leave post (isConversationLeavePost) is a system event, not a
|
|
13
|
+
// message, so it must not notify the remaining members.
|
|
14
|
+
if (isConversationLeavePost(post))
|
|
15
|
+
return;
|
|
12
16
|
for (const recipientProfile of post.audience) {
|
|
13
17
|
if (post.profile.id !== recipientProfile.id) {
|
|
14
18
|
await maybeCreateNotification(recipientProfile, {
|
|
@@ -526,11 +526,12 @@ export declare const rsvpManageByOrganizer: (actingProfile: Profile, targetProfi
|
|
|
526
526
|
* participants as audience. The leaving user is excluded so future
|
|
527
527
|
* replies (which inherit the audience) won't notify them, and the thread
|
|
528
528
|
* disappears from their inbox.
|
|
529
|
-
* -
|
|
530
|
-
*
|
|
531
|
-
*
|
|
532
|
-
*
|
|
533
|
-
*
|
|
529
|
+
* - The "left" post is recognized everywhere via isConversationLeavePost
|
|
530
|
+
* (common): a reply that leaves the author out of the audience. Thread
|
|
531
|
+
* and conversation-list renderers show the "left" label, the
|
|
532
|
+
* directMessage notification handler skips it, and the conversation
|
|
533
|
+
* post-creation endpoint uses it to block leavers and exclude them from
|
|
534
|
+
* future replies' audience.
|
|
534
535
|
* - A 1:1 conversation can span several roots, so each root's thread gets
|
|
535
536
|
* its own "left" post — otherwise the leaver's inbox would keep the
|
|
536
537
|
* threads whose newest post is still in their audience.
|
package/dist/posts/mutations.js
CHANGED
|
@@ -513,11 +513,12 @@ const organizerPreviousResponse = (post, profileId, recurrenceId) => [...(post.r
|
|
|
513
513
|
* participants as audience. The leaving user is excluded so future
|
|
514
514
|
* replies (which inherit the audience) won't notify them, and the thread
|
|
515
515
|
* disappears from their inbox.
|
|
516
|
-
* -
|
|
517
|
-
*
|
|
518
|
-
*
|
|
519
|
-
*
|
|
520
|
-
*
|
|
516
|
+
* - The "left" post is recognized everywhere via isConversationLeavePost
|
|
517
|
+
* (common): a reply that leaves the author out of the audience. Thread
|
|
518
|
+
* and conversation-list renderers show the "left" label, the
|
|
519
|
+
* directMessage notification handler skips it, and the conversation
|
|
520
|
+
* post-creation endpoint uses it to block leavers and exclude them from
|
|
521
|
+
* future replies' audience.
|
|
521
522
|
* - A 1:1 conversation can span several roots, so each root's thread gets
|
|
522
523
|
* its own "left" post — otherwise the leaver's inbox would keep the
|
|
523
524
|
* threads whose newest post is still in their audience.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openpeepshq/core",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.11",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "GPL-3.0-or-later",
|
|
6
6
|
"dependencies": {
|
|
@@ -37,10 +37,10 @@
|
|
|
37
37
|
"type-fest": "^4.31.0",
|
|
38
38
|
"uuidv7": "^1.0.2",
|
|
39
39
|
"web-push": "^3.6.7",
|
|
40
|
-
"@openpeepshq/common": "0.5.
|
|
41
|
-
"@openpeepshq/
|
|
40
|
+
"@openpeepshq/common": "0.5.12",
|
|
41
|
+
"@openpeepshq/geocoder": "^0.1.2",
|
|
42
42
|
"@openpeepshq/fetch-client": "^0.2.1",
|
|
43
|
-
"@openpeepshq/
|
|
43
|
+
"@openpeepshq/i18n": "^0.4.11"
|
|
44
44
|
},
|
|
45
45
|
"main": "dist/index.js",
|
|
46
46
|
"types": "dist/index.d.ts",
|