parent
54c4baacb6
commit
d7f3a8d01f
|
@ -35,11 +35,13 @@ describe(`#/state/messages/convo`, () => {
|
||||||
it.todo(
|
it.todo(
|
||||||
`successfully sent messages are re-ordered, if needed, by events received from server`,
|
`successfully sent messages are re-ordered, if needed, by events received from server`,
|
||||||
)
|
)
|
||||||
|
it.todo(`pending messages are cleaned up from state after firehose event`)
|
||||||
})
|
})
|
||||||
|
|
||||||
describe(`deleting messages`, () => {
|
describe(`deleting messages`, () => {
|
||||||
it.todo(`messages are optimistically deleted from the chat`)
|
it.todo(`messages are optimistically deleted from the chat`)
|
||||||
it.todo(`messages are confirmed deleted via events from the server`)
|
it.todo(`messages are confirmed deleted via events from the server`)
|
||||||
|
it.todo(`deleted messages are cleaned up from state after firehose event`)
|
||||||
})
|
})
|
||||||
|
|
||||||
describe(`log handling`, () => {
|
describe(`log handling`, () => {
|
||||||
|
|
|
@ -678,14 +678,10 @@ export class Convo {
|
||||||
/*
|
/*
|
||||||
* Update if we have this in state. If we don't, don't worry about it.
|
* Update if we have this in state. If we don't, don't worry about it.
|
||||||
*/
|
*/
|
||||||
// TODO check for other storage spots
|
if (
|
||||||
if (this.pastMessages.has(ev.message.id)) {
|
this.pastMessages.has(ev.message.id) ||
|
||||||
/*
|
this.newMessages.has(ev.message.id)
|
||||||
* For now, we remove deleted messages from the thread, if we receive one.
|
) {
|
||||||
*
|
|
||||||
* To support them, it'd look something like this:
|
|
||||||
* this.pastMessages.set(ev.message.id, ev.message)
|
|
||||||
*/
|
|
||||||
this.pastMessages.delete(ev.message.id)
|
this.pastMessages.delete(ev.message.id)
|
||||||
this.newMessages.delete(ev.message.id)
|
this.newMessages.delete(ev.message.id)
|
||||||
this.deletedMessages.delete(ev.message.id)
|
this.deletedMessages.delete(ev.message.id)
|
||||||
|
|
Loading…
Reference in New Issue