class HistoryWarnings

Defined in:

privateparlor/history/history_warnings.cr

Constructors

Instance Method Summary

Instance methods inherited from class History

add_to_cache(origin_msid : Int64, msid : Int64, receiver_id : Int64) : Nil add_to_cache, del_message_group(msid : Int64) : Int64 del_message_group, expire : Nil expire, expired?(message : MessageGroup) : Bool expired?, get_all_msids(msid : Int64) : Hash get_all_msids, get_msid(msid : Int64, receiver_id : Int64) : Int64 | Nil get_msid, get_msids_from_user(uid : Int64) : Set(Int64) get_msids_from_user, get_origin_msid(msid : Int64) : Int64 | Nil get_origin_msid, get_sender_id(msid : Int64) : Int64 | Nil get_sender_id, lifespan : Time::Span lifespan, msid_map : Hash(Int64, MessageGroup) msid_map, new_message(sender_id : Int64, msid : Int64) : Int64 new_message

Constructor methods inherited from class History

new(message_life : Time::Span) new

Constructor Detail

def self.new(message_life : Time::Span) #

[View source]

Instance Method Detail

def add_warning(msid : Int64) : Nil #

Set the warned variable in the associated MessageGroup.


[View source]
def get_warning(msid : Int64) : Bool | Nil #

Returns true if the associated MessageGroup was warned; false otherwise.


[View source]
def new_message(sender_id : Int64, msid : Int64) : Int64 #

Creates a new MessageGroup with the sender_id and its associated msid

Returns the original msid of the new MessageGroup


[View source]