@rmdes/indiekit-endpoint-activitypub 2.9.1 → 2.9.2

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.
package/assets/reader.css CHANGED
@@ -1463,14 +1463,14 @@
1463
1463
  }
1464
1464
 
1465
1465
  /* Inline mention links in DM content (Mastodon wraps @user in span inside a link) */
1466
- .ap-message__content a .h-card,
1467
- .ap-message__content a .mention,
1466
+ .ap-message__content .h-card,
1467
+ .ap-message__content a.mention,
1468
1468
  .ap-message__content a span {
1469
1469
  display: inline;
1470
1470
  }
1471
1471
 
1472
1472
  .ap-message__content a {
1473
- word-break: break-all;
1473
+ overflow-wrap: break-word;
1474
1474
  }
1475
1475
 
1476
1476
  @media (max-width: 640px) {
@@ -262,7 +262,7 @@ export function submitMessageController(mountPath, plugin) {
262
262
  uid: noteId,
263
263
  actorUrl: recipient.id.href,
264
264
  actorName: recipientName,
265
- actorPhoto: recipient.iconUrl?.href || "",
265
+ actorPhoto: recipient.iconUrl?.href || recipient.icon?.url?.href || "",
266
266
  actorHandle: recipientHandle,
267
267
  content: {
268
268
  text: content.trim(),
@@ -101,12 +101,13 @@ export async function getConversationPartners(collections) {
101
101
  const { ap_messages } = collections;
102
102
 
103
103
  const pipeline = [
104
+ { $sort: { published: -1 } },
104
105
  {
105
106
  $group: {
106
107
  _id: "$conversationId",
107
- actorName: { $last: "$actorName" },
108
- actorPhoto: { $last: "$actorPhoto" },
109
- actorHandle: { $last: "$actorHandle" },
108
+ actorName: { $first: "$actorName" },
109
+ actorPhoto: { $max: "$actorPhoto" },
110
+ actorHandle: { $first: "$actorHandle" },
110
111
  lastMessage: { $max: "$published" },
111
112
  unreadCount: {
112
113
  $sum: { $cond: [{ $eq: ["$read", false] }, 1, 0] },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rmdes/indiekit-endpoint-activitypub",
3
- "version": "2.9.1",
3
+ "version": "2.9.2",
4
4
  "description": "ActivityPub federation endpoint for Indiekit via Fedify. Adds full fediverse support: actor, inbox, outbox, followers, following, syndication, and Mastodon migration.",
5
5
  "keywords": [
6
6
  "indiekit",