add per-room mutex, possibly fixes #8
This commit is contained in:
@@ -49,6 +49,8 @@ func (b *Bot) Send(ctx context.Context, email *utils.Email) error {
|
||||
if !ok {
|
||||
return errors.New("room not found")
|
||||
}
|
||||
b.lock(roomID)
|
||||
defer b.unlock(roomID)
|
||||
|
||||
cfg, err := b.getSettings(roomID)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user