mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 23:54:16 +08:00
31035010af
When there are multiple groups on a topic, we were selecting the first from the topic allowed groups to act as the sender email address when sending group SMTP replies via PostAlerter. However, this was not ordered, and since there is no created_at column on TopicAllowedGroup we cannot order this nicely, which caused just a random group to be used (based on whatever postgres decided it felt like that morning). This commit changes the group used for SMTP sending to be the group using the email_username of the to address of the first incoming email for the topic, if there are more than one allowed groups on the topic. Otherwise it just uses the only SMTP enabled group. |
||
---|---|---|
.. | ||
components | ||
fabricators | ||
fixtures | ||
helpers | ||
import_export | ||
initializers | ||
integration | ||
integrity | ||
jobs | ||
lib | ||
mailers | ||
models | ||
multisite | ||
requests | ||
script/import_scripts | ||
serializers | ||
services | ||
support | ||
tasks | ||
views/omniauth_callbacks | ||
rails_helper.rb | ||
swagger_helper.rb |