Add CreatedAt and Search feeds, combine date feeds into one type, fix Tags.replies, fix sort order of relay selections
This commit is contained in:
@@ -82,7 +82,7 @@ export class Router {
|
||||
|
||||
sortRelaySelections = (relaySelections: RelayValues[]) => {
|
||||
const scores = new Map<string, number>()
|
||||
const getScore = (relayValues: RelayValues) => scores.get(relayValues.relay) || 0
|
||||
const getScore = (relayValues: RelayValues) => -(scores.get(relayValues.relay) || 0)
|
||||
|
||||
for (const relayValues of relaySelections) {
|
||||
scores.set(relayValues.relay, this.scoreRelaySelection(relayValues))
|
||||
|
||||
@@ -98,7 +98,11 @@ export class Tags extends (Fluent<Tag> as OmitStatics<typeof Fluent<Tag>, 'from'
|
||||
const dispatchTags = (thisTags: Tags) =>
|
||||
thisTags.forEach((t: Tag, i: number) => {
|
||||
if (t.mark() === 'root') {
|
||||
roots.push(t.valueOf())
|
||||
if (thisTags.whereMark("reply").count() === 0) {
|
||||
replies.push(t.valueOf())
|
||||
} else {
|
||||
roots.push(t.valueOf())
|
||||
}
|
||||
} else if (t.mark() === 'reply') {
|
||||
replies.push(t.valueOf())
|
||||
} else if (t.mark() === 'mention') {
|
||||
|
||||
Reference in New Issue
Block a user