Resolve "BUG: message counts not incremented if they don't yet exist" (#63)
Closes #63 (closed)
BUG: message counts not incremented
- CAUSE: count incrementing functions assume a message count already exist for each channel. if such a count does not exist, nothing will be incremented (because no
messageCount
record will be found) - FIX: introduce a
hasOne/belongsToOne
relationship betweenchannel
andmessageCount
; use it to create an emptymessageCount
record for eachchannel
whenever one is created inchannelRepository#create
Edited by aguestuser