From da389a664b87bb131435f2ccb904c0754d5d1655 Mon Sep 17 00:00:00 2001 From: multiple creatures Date: Tue, 6 Aug 2019 13:55:54 -0500 Subject: added ability to link accounts with `account:link:token` + `account:link:add` & switch between them with `i:am`/`we:are` bangtags; remove links with `account:link:del:USERNAME` or `account:link:clear`; list links with `account:link:list` --- app/models/status.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'app/models/status.rb') diff --git a/app/models/status.rb b/app/models/status.rb index a6be93789..9f11e6d5d 100644 --- a/app/models/status.rb +++ b/app/models/status.rb @@ -306,6 +306,14 @@ class Status < ApplicationRecord update_status_stat!(key => [public_send(key) - 1, 0].max) end + def session=(value) + @session = value + end + + def session + @session || nil + end + after_create_commit :increment_counter_caches after_destroy_commit :decrement_counter_caches -- cgit