if messageType != telepathy.CHANNEL_TEXT_MESSAGE_TYPE_NORMAL:
raise telepathy.errors.NotImplemented("Unhandled message type: %r" % messageType)
+ _moduleLogger.info("Sending message to %r" % (self.__otherHandle, ))
self._conn.session.backend.send_sms(self.__otherHandle.phoneNumber, text)
self._conn.session.textsStateMachine.reset_timers()
self._report_conversation(mergedConversations)
def _report_conversation(self, mergedConversations):
+ # Can't filter out messages in a texting conversation that came in
+ # before the last one sent because that creates a race condition of two
+ # people sending at about the same time, which happens quite a bit
newConversations = mergedConversations.conversations
newConversations = self._filter_out_reported(newConversations)
newConversations = self._filter_out_read(newConversations)
#!/usr/bin/python
+# @bug Its inconsistent as to whether messages from contacts come as from the
+# contact or just a raw number
+# @bug False positives on startup. Luckily the object path for the channel is
+# unique, so can use that to cache some of the data out to file
import logging
for newMessage in newConversationMessages
if newMessage not in relatedConversation.messages
]
- _moduleLogger.info("Found %d new messages in conversation %s (%d/%d)" % (
+ _moduleLogger.debug("Found %d new messages in conversation %s (%d/%d)" % (
len(newConversationMessages) - len(newConversation.messages),
newConversation.id,
len(newConversation.messages),
)
self._addressbookStateMachine.set_state_strategy(
state_machine.StateMachine.STATE_ACTIVE,
- state_machine.ConstantStateStrategy(state_machine.to_milliseconds(hours=1))
+ state_machine.ConstantStateStrategy(state_machine.to_milliseconds(hours=2))
)
self._voicemails = conversations.Conversations(self._backend.get_voicemails)
)
self._voicemailsStateMachine.set_state_strategy(
state_machine.StateMachine.STATE_IDLE,
- state_machine.ConstantStateStrategy(state_machine.to_milliseconds(minutes=30))
+ state_machine.ConstantStateStrategy(state_machine.to_milliseconds(minutes=60))
)
self._voicemailsStateMachine.set_state_strategy(
state_machine.StateMachine.STATE_ACTIVE,
- state_machine.ConstantStateStrategy(state_machine.to_milliseconds(minutes=5))
+ state_machine.ConstantStateStrategy(state_machine.to_milliseconds(minutes=10))
)
self._voicemails.updateSignalHandler.register_sink(
self._voicemailsStateMachine.request_reset_timers
self._textsStateMachine.set_state_strategy(
state_machine.StateMachine.STATE_ACTIVE,
state_machine.GeometricStateStrategy(
- state_machine.to_milliseconds(seconds=10),
- state_machine.to_milliseconds(seconds=1),
+ state_machine.to_milliseconds(seconds=20),
+ state_machine.to_milliseconds(milliseconds=500),
state_machine.to_milliseconds(minutes=10),
)
)
_moduleLogger.info("%s Starting State Machine" % (self._name, ))
def stop(self):
+ _moduleLogger.info("%s Stopping State Machine" % (self._name, ))
self._stop_update()
def close(self):
return self._state
def reset_timers(self):
+ _moduleLogger.info("%s Resetting State Machine" % (self._name, ))
self._reset_timers()
@property
nextTimeout = self._strategy.timeout
if nextTimeout != self.INFINITE_PERIOD:
self._timeoutId = gobject.timeout_add(nextTimeout, self._on_timeout)
- _moduleLogger.debug("%s Next update in %s ms" % (self._name, nextTimeout, ))
+ _moduleLogger.info("%s Next update in %s ms" % (self._name, nextTimeout, ))
def _stop_update(self):
if self._timeoutId is None:
_success(channel._object_path, props)
# CreateChannel MUST return *before* NewChannels is emitted.
+ # @bug On older python-telepathy, it doesn't exist
self.signal_new_channels([channel])
@dbus.service.method(telepathy.interfaces.CONNECTION_INTERFACE_REQUESTS,
_success(yours, channel._object_path, props)
+ # @bug On older python-telepathy, it doesn't exist
self.signal_new_channels([channel])