git ssb

7+

dinoworm 🐛 / patchcore



Commit 983320c77ce095de70365292b8db47b322af509a

lastId should return an array if there was a concurrent update to the thread (#18)

Dominic Tarr authored on 6/3/2017, 12:01:40 AM
Mikey committed on 6/3/2017, 12:01:40 AM
Parent: 654a3bef4ca321c95c33b7ec9447d1df0bcf3753

Files changed

feed/obs/thread.jschanged
feed/obs/thread.jsView
@@ -46,10 +46,11 @@
4646
4747 var result = {
4848 messages,
4949 lastId: computed(messages, (messages) => {
50- var last = messages[messages.length - 1]
51- if (last) return last.key
50 + var branches = sort.heads(messages)
51 + if(branches.length <= 1) branches = branches[0]
52 + return branches
5253 }),
5354 rootId: computed(messages, (messages) => {
5455 if (branch && messages.length) {
5556 return messages[0].value.content.root

Built with git-ssb-web