Philipp Hörist pushed to branch master at gajim / gajim
Commits:
6f472cc1 by Philipp Hörist at 2017-09-29T12:41:26+02:00
Set message as read before removing an event
When we receive carbons of a conversation, we remove the events once
we receive a carbon from ourself, because that means we anwered from
another device.
This sets these removed messages also as read in the unread_message
table, so they dont popup on restart.
- - - - -
1 changed file:
- gajim/session.py
Changes:
=====================================
gajim/session.py
=====================================
--- a/gajim/session.py
+++ b/gajim/session.py
@@ -247,6 +247,12 @@ class ChatControlSession(stanza_session.EncryptedStanzaSession):
# Its a Carbon Copied Message we sent
obj.show_in_roster = False
obj.show_in_systray = False
+ unread_events = app.events.get_events(
+ self.conn.name, fjid, types=['chat'])
+ read_ids = []
+ for msg in unread_events:
+ read_ids.append(msg.msg_log_id)
+ app.logger.set_read_messages(read_ids)
app.events.remove_events(self.conn.name, fjid, types=['chat'])
do_event = False
else:
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/6f472cc120142691c6a46ff95cb494b941…
---
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/6f472cc120142691c6a46ff95cb494b941…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / gajim
Commits:
69248b2f by Philipp Hörist at 2017-09-29T00:11:29+02:00
Fix pylint/pep8 errors
- - - - -
3 changed files:
- gajim/common/connection.py
- gajim/common/connection_handlers.py
- gajim/common/connection_handlers_events.py
Changes:
=====================================
gajim/common/connection.py
=====================================
--- a/gajim/common/connection.py
+++ b/gajim/common/connection.py
@@ -433,10 +433,10 @@ class CommonConnection:
return
app.logger.insert_into_logs(jid, obj.timestamp, obj.kind,
- message=obj.message,
- subject=obj.subject,
- additional_data=obj.additional_data,
- stanza_id=obj.stanza_id)
+ message=obj.message,
+ subject=obj.subject,
+ additional_data=obj.additional_data,
+ stanza_id=obj.stanza_id)
def ack_subscribed(self, jid):
"""
=====================================
gajim/common/connection_handlers.py
=====================================
--- a/gajim/common/connection_handlers.py
+++ b/gajim/common/connection_handlers.py
@@ -1059,10 +1059,10 @@ class ConnectionHandlersBase:
show = app.logger.convert_show_values_to_db_api_values(obj.show)
if show is not None:
app.logger.insert_into_logs(nbxmpp.JID(obj.jid).getStripped(),
- time_time(),
- KindConstant.STATUS,
- message=obj.status,
- show=show)
+ time_time(),
+ KindConstant.STATUS,
+ message=obj.status,
+ show=show)
def _nec_gc_presence_received(self, obj):
if obj.conn.name != self.name:
@@ -1185,11 +1185,11 @@ class ConnectionHandlersBase:
# usually it hold description and can be send at each connection
# so don't store it in logs
app.logger.insert_into_logs(obj.jid,
- obj.timestamp,
- KindConstant.GC_MSG,
- message=obj.msgtxt,
- contact_name=obj.nick,
- additional_data=obj.additional_data)
+ obj.timestamp,
+ KindConstant.GC_MSG,
+ message=obj.msgtxt,
+ contact_name=obj.nick,
+ additional_data=obj.additional_data)
# store in memory time of last message logged.
# this will also be saved in rooms_last_message_time table
# when we quit this muc
@@ -1207,10 +1207,10 @@ class ConnectionHandlersBase:
if session.is_loggable():
app.logger.insert_into_logs(nbxmpp.JID(frm).getStripped(),
- tim,
- KindConstant.ERROR,
- message=error_msg,
- subject=subject)
+ tim,
+ KindConstant.ERROR,
+ message=error_msg,
+ subject=subject)
app.nec.push_incoming_event(MessageErrorEvent(None, conn=self,
fjid=frm, error_code=msg.getErrorCode(), error_msg=error_msg,
=====================================
gajim/common/connection_handlers_events.py
=====================================
--- a/gajim/common/connection_handlers_events.py
+++ b/gajim/common/connection_handlers_events.py
@@ -869,11 +869,11 @@ class GcPresenceReceivedEvent(nec.NetworkIncomingEvent, HelperEvent):
if show is not None:
fjid = nbxmpp.JID(self.fjid)
app.logger.insert_into_logs(fjid.getStripped(),
- time_time(),
- KindConstant.GCSTATUS,
- contact_name=fjid.getResource(),
- message=st,
- show=show)
+ time_time(),
+ KindConstant.GCSTATUS,
+ contact_name=fjid.getResource(),
+ message=st,
+ show=show)
if self.avatar_sha == '':
# contact has no avatar
puny_nick = helpers.sanitize_filename(self.nick)
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/69248b2fe7bd01c5981154d6c8c1bae310…
---
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/69248b2fe7bd01c5981154d6c8c1bae310…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / python-nbxmpp
Commits:
b9fa37be by Philipp Hörist at 2017-09-25T15:00:30+02:00
Update Version of setup.py
- - - - -
1 changed file:
- setup.py
Changes:
=====================================
setup.py
=====================================
--- a/setup.py
+++ b/setup.py
@@ -3,7 +3,7 @@
from distutils.core import setup
setup(name='nbxmpp',
- version='0.5.7',
+ version='0.6.0',
description='Non blocking Jabber/XMPP module',
author='Yann Leboulanger',
author_email='asterix(a)lagaule.org',
View it on GitLab: https://dev.gajim.org/gajim/python-nbxmpp/commit/b9fa37be8d6bcb7296926a755d…
---
View it on GitLab: https://dev.gajim.org/gajim/python-nbxmpp/commit/b9fa37be8d6bcb7296926a755d…
You're receiving this email because of your account on dev.gajim.org.