you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 3 insightful - 1 fun3 insightful - 0 fun4 insightful - 1 fun -  (2 children)

example, adding a boolean preference "pref_chat_enabled". i'd call it "pref_sendreplies" to match the existing "sendreplies" but no biggie.

adding the preference: https://github.com/libertysoft3/reddit-ae/blob/88b6edc4e2361a903215ed57ce4767043f4ef5c3/r2/r2/models/account.py#L166

getting user's preference state:

c.user.pref_chat_enabled # boolean

You will have to do a flush and maybe a restart before the permission gets created.

[–]magnora7[S] 3 insightful - 2 fun3 insightful - 1 fun4 insightful - 2 fun -  (0 children)

Haha that's the exact variable I referenced to make my example I just sent to you. I think we've almost got it here.

[–]magnora7[S] 3 insightful - 1 fun3 insightful - 0 fun4 insightful - 1 fun -  (0 children)

okay I will add the preference right now.