Commit Graph

4 Commits

Author SHA1 Message Date
Joffrey JAFFEUX
cb118c979c
DEV: prevents flakey spec (#25855)
Deleting the user of the message was unreliable, giving the test its own message to act on fixes it.
2024-02-26 09:43:29 +01:00
Joffrey JAFFEUX
a1d7548869
FIX: prevents exception when last reply has deleted user (#25852)
Prior to this fix, if the last message of a thread had been made by a deleted user it would cause an exception as we would have no user to display, this commit uses a solution we have been using at other places: the null pattern, through the use of `Chat::NullUser.new`.
2024-02-26 10:44:54 +08:00
Joffrey JAFFEUX
039d060832
DEV: improves reliability of delete/restore/update specs (#24265) 2023-11-07 11:34:35 +01:00
Joffrey JAFFEUX
92839dc722
FIX: ensures an empty last message won't cause errors (#23647)
This would cause an error when deleting the original message of a thread, due to the non existing `last_message`. This fix is implemented using the null pattern.

Note this commit is also using this opportunity to unify naming of null objects, `Chat::DeletedUser` becomes `Chat::NullUser`, it feels better to have a name describing what is the object, instead of a name describing why this object has to be used, which can change depending on cases.
2023-09-25 12:43:04 +02:00