mirror of
https://github.com/minetest/contentdb.git
synced 2024-12-22 14:02:24 +01:00
Fix crash when mentioning users in comments
Thanks @Dragonop for help finding the cause
This commit is contained in:
parent
aecde93310
commit
64d8f30006
@ -258,7 +258,8 @@ def view(id):
|
|||||||
add_notification(mentioned, current_user, NotificationType.THREAD_REPLY,
|
add_notification(mentioned, current_user, NotificationType.THREAD_REPLY,
|
||||||
msg, thread.get_view_url(), thread.package)
|
msg, thread.get_view_url(), thread.package)
|
||||||
|
|
||||||
thread.watchers.append(mentioned)
|
if mentioned not in thread.watchers:
|
||||||
|
thread.watchers.append(mentioned)
|
||||||
|
|
||||||
msg = "New comment on '{}'".format(thread.title)
|
msg = "New comment on '{}'".format(thread.title)
|
||||||
add_notification(thread.watchers, current_user, NotificationType.THREAD_REPLY, msg, thread.get_view_url(), thread.package)
|
add_notification(thread.watchers, current_user, NotificationType.THREAD_REPLY, msg, thread.get_view_url(), thread.package)
|
||||||
|
Loading…
Reference in New Issue
Block a user