mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 15:28:37 +08:00
DEV: Replace raw comments with deprecation warnings (#22617)
We have a number of raw comments indicating that certain methods and classes are deprecated and marked for removal. This change turn those comments into deprecation warnings so that we can 1) see them in the logs of our own hosting and 2) give some warning to self hosters.
This commit is contained in:
@ -659,11 +659,11 @@ class User < ActiveRecord::Base
|
||||
results.to_h
|
||||
end
|
||||
|
||||
###
|
||||
# DEPRECATED: This is only maintained for backwards compat until v2.5. There
|
||||
# may be inconsistencies with counts in the UI because of this, because unread
|
||||
# high priority includes PMs AND bookmark reminders.
|
||||
def unread_private_messages
|
||||
Discourse.deprecate(
|
||||
"#unread_private_messages is deprecated, use #unread_high_priority_notifications instead.",
|
||||
drop_from: "2.5.0",
|
||||
)
|
||||
@unread_pms ||= unread_high_priority_notifications
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user