diff --git a/src/routes/_actions/streaming.js b/src/routes/_actions/streaming.js
index 3bd6f297..829dbe2d 100644
--- a/src/routes/_actions/streaming.js
+++ b/src/routes/_actions/streaming.js
@@ -21,7 +21,7 @@ function processMessage (instanceName, timelineName, message) {
// a timeline of statuses. To have a clean implementation we would need to
// reproduce what is done for statuses for the conversation.
//
- // It will add new DMs as new conversations intead of updating existing threads
+ // It will add new DMs as new conversations instead of updating existing threads
addStatusOrNotification(instanceName, timelineName, JSON.parse(payload).last_status)
break
}
diff --git a/src/routes/_api/TimelineStream.js b/src/routes/_api/TimelineStream.js
index 1baef004..31501d7b 100644
--- a/src/routes/_api/TimelineStream.js
+++ b/src/routes/_api/TimelineStream.js
@@ -12,7 +12,7 @@ function getStreamName (timeline) {
return 'user'
case 'notifications':
return 'user:notification'
- case 'conversations':
+ case 'direct':
return 'direct'
}
if (timeline.startsWith('tag/')) {
diff --git a/src/routes/_api/timelines.js b/src/routes/_api/timelines.js
index 25e9f5c0..bb7f455d 100644
--- a/src/routes/_api/timelines.js
+++ b/src/routes/_api/timelines.js
@@ -12,7 +12,7 @@ function getTimelineUrlPath (timeline) {
return 'notifications'
case 'favorites':
return 'favourites'
- case 'conversations':
+ case 'direct':
return 'conversations'
}
if (timeline.startsWith('tag/')) {
@@ -24,7 +24,7 @@ function getTimelineUrlPath (timeline) {
}
}
-export function getTimeline (instanceName, accessToken, timeline, maxId, since, limit) {
+export async function getTimeline (instanceName, accessToken, timeline, maxId, since, limit) {
let timelineUrlName = getTimelineUrlPath(timeline)
let url = `${basename(instanceName)}/api/v1/${timelineUrlName}`
@@ -63,8 +63,10 @@ export function getTimeline (instanceName, accessToken, timeline, maxId, since,
url += '?' + paramsString(params)
- const timelineRequest = get(url, auth(accessToken), { timeout: DEFAULT_TIMEOUT })
+ const items = await get(url, auth(accessToken), { timeout: DEFAULT_TIMEOUT })
- if (timeline !== 'conversations') return timelineRequest
- return timelineRequest.then(items => items.map(item => item.last_status))
+ if (timeline === 'direct') {
+ return items.map(item => item.last_status)
+ }
+ return items
}
diff --git a/src/routes/_components/NavShortcuts.html b/src/routes/_components/NavShortcuts.html
index edbeb590..00f03a81 100644
--- a/src/routes/_components/NavShortcuts.html
+++ b/src/routes/_components/NavShortcuts.html
@@ -4,7 +4,7 @@
-
+
diff --git a/src/routes/_components/status/Status.html b/src/routes/_components/status/Status.html
index ef40955a..df3013b1 100644
--- a/src/routes/_components/status/Status.html
+++ b/src/routes/_components/status/Status.html
@@ -73,6 +73,10 @@
border-bottom: 1px solid var(--main-border);
}
+ .status-article.status-direct {
+ background-color: var(--status-direct-background);
+ }
+
.status-article:focus {
outline: none; /* focus is on the parent instead */
}
@@ -284,6 +288,7 @@
className: ({ visibility, timelineType, isStatusInOwnThread, $underlineLinks, $disableTapOnStatus }) => (classname(
'status-article',
'shortcut-list-item',
+ timelineType !== 'direct' && visibility === 'direct' && 'status-direct',
timelineType !== 'search' && 'status-in-timeline',
isStatusInOwnThread && 'status-in-own-thread',
$underlineLinks && 'underline-links',
diff --git a/src/routes/_pages/community/index.html b/src/routes/_pages/community/index.html
index 565e4bec..4dc7c4ac 100644
--- a/src/routes/_pages/community/index.html
+++ b/src/routes/_pages/community/index.html
@@ -21,8 +21,8 @@
icon="#fa-star"
pinnable="true"
/>
-
@@ -89,6 +89,7 @@
Share
Federated
Favorites
+ Conversations
{/if}