|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
jid_is_from_pm(self,
jid)
If jid is gajim@conf/nkour it's likely a pm one, how we know gajim@conf
is not a normal guy and nkour is not his resource? we ask if gajim@conf
is already in jids (with type room jid) this fails if user disables
logging for room and only enables for pm (so higly unlikely) and if we
fail we do not go chaos (user will see the first pm as if it was message
in room's public chat) and after that all okay |
source code
|
|
|
|
|
|
|
get_jid_id(self,
jid,
typestr=None)
jids table has jid and jid_id logs table has log_id, jid_id,
contact_name, time, kind, show, message so to ask logs we need jid_id
that matches our jid in jids table this method wants jid and returns the
jid_id for later sql-ing on logs typestr can be 'ROOM' or anything else
depending on the type of JID and is only needed to be specified when the
JID is new in DB |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
write(self,
kind,
jid,
message=None,
show=None,
tim=None,
subject=None)
Write a row (status, gcstatus, message etc) to logs database |
source code
|
|
|
|
get_last_conversation_lines(self,
jid,
restore_how_many_rows,
pending_how_many,
timeout,
account)
Accept how many rows to restore and when to time them out (in minutes)
(mark them as too old) and number of messages that are in queue and are
already logged but pending to be viewed, returns a list of tupples
containg time, kind, message, list with empty tupple if nothing found to
meet our demands |
source code
|
|
|
|
|
|
|
get_conversation_for_date(self,
jid,
year,
month,
day,
account)
Return contact_name, time, kind, show, message, subject |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|