Ha! Finally :)
I've fixed the "facebook-doesn't-show-notifications-but-twitter-does-bug" - at least at my pc ;)
Relevant debug message is in my post #33
There seems to go something wrong with couchdb
Relevant debug infos are displayed by changing the exception in the on_message_updated() method:
Gwibber Dispatcher: DEBUG Checking message 10000062*****_13141****** timestamp (2010-05-31 21:01:33.00) to see if it is newer than 2010-05-31 20:51:39.33
Gwibber Dispatcher: DEBUG Message 10000062*****_13141****** newer than 2010-05-31 20:51:39.33, notifying
Traceback (most recent call last):
File "/usr/lib/python2.6/dist-packages/gwibber/microblog/dispatcher.py", line 263, in on_message_updated
self.new_message(message)
File "/usr/lib/python2.6/dist-packages/gwibber/microblog/dispatcher.py", line 310, in new_message
if indicate and message["to_me"]:
File "/usr/lib/python2.6/dist-packages/desktopcouch/records/record.py", line 389, in __getitem__
return super(Record, self).__getitem__(key)
File "/usr/lib/python2.6/dist-packages/desktopcouch/records/record.py", line 130, in __getitem__
value = self._data[key]
KeyError: 'to_me'
Gwibber Dispatcher: DEBUG <facebook:receive> Finished operation
------------------------------------------
Solution / Hack to show the notification before couchdb throws the exception:
change the "def new_message(self, message)" method in /usr/lib/python2.6/dist-packages/gwibber/microblog/dispatcher.py
( I've simply switched the order of "if message["id"] not in self.notified_items:" and "if indicate and message["to_me"]:" )
------------------------------------------
def new_message(self, message):
min_time = mx.DateTime.DateTimeFromTicks() - mx.DateTime.TimeDelta(minutes=10.0)
log.logger.debug("Checking message %s timestamp (%s) to see if it is newer than %s", message["id"], mx.DateTime.DateTimeFromTicks(message["time"]).localtime(), min_time)
if mx.DateTime.DateTimeFromTicks(message["time"]).localtime() > mx.DateTime.DateTimeFromTicks(min_time):
log.logger.debug("Message %s newer than %s, notifying", message["id"], min_time)
if message["id"] not in self.notified_items: self.notified_items.append(message["id"]) self.show_notification_bubble(message)
if indicate and message["to_me"]:
if message["id"] not in self.indicator_items: log.logger.debug("Message %s is a reply, adding messaging indicator", message["id"]) self.handle_indicator_item(message)
------------------------------------------
I've attached both changed files, facebook.py and dispatcher.py
Put both files into /usr/lib/python2.6/dist-packages/gwibber/microblog/ , restart gwibber-service and it should work :)
Ha! Finally :) doesn't- show-notificati ons-but- twitter- does-bug" - at least at my pc ;)
I've fixed the "facebook-
Relevant debug message is in my post #33
There seems to go something wrong with couchdb updated( ) method:
Relevant debug infos are displayed by changing the exception in the on_message_
------- ------- ------- ------- ------- -------
def on_message_ updated( self, monitor, id): logger. debug(" Message updated: %s", id) get_record( id) new_message( message) log.logger. error(" Message updated: %s, failed", id)
#try:
log.
message = self.messages.
self.
#except:
#
------- ------- ------- ------- ------- -------
The Error Message is:
------- ------- ------- ------- ------- -------
Gwibber Dispatcher: DEBUG Checking message 10000062* ****_13141* ***** timestamp (2010-05-31 21:01:33.00) to see if it is newer than 2010-05-31 20:51:39.33 ****_13141* ***** newer than 2010-05-31 20:51:39.33, notifying python2. 6/dist- packages/ gwibber/ microblog/ dispatcher. py", line 263, in on_message_updated new_message( message) python2. 6/dist- packages/ gwibber/ microblog/ dispatcher. py", line 310, in new_message python2. 6/dist- packages/ desktopcouch/ records/ record. py", line 389, in __getitem__ _getitem_ _(key) python2. 6/dist- packages/ desktopcouch/ records/ record. py", line 130, in __getitem__
Gwibber Dispatcher: DEBUG Message 10000062*
Traceback (most recent call last):
File "/usr/lib/
self.
File "/usr/lib/
if indicate and message["to_me"]:
File "/usr/lib/
return super(Record, self)._
File "/usr/lib/
value = self._data[key]
KeyError: 'to_me'
Gwibber Dispatcher: DEBUG <facebook:receive> Finished operation
------- ------- ------- ------- ------- -------
Solution / Hack to show the notification before couchdb throws the exception:
change the "def new_message(self, message)" method in /usr/lib/ python2. 6/dist- packages/ gwibber/ microblog/ dispatcher. py items:" and "if indicate and message["to_me"]:" )
( I've simply switched the order of "if message["id"] not in self.notified_
------- ------- ------- ------- ------- -------
def new_message(self, message): DateTimeFromTic ks() - mx.DateTime. TimeDelta( minutes= 10.0) logger. debug(" Checking message %s timestamp (%s) to see if it is newer than %s", message["id"], mx.DateTime. DateTimeFromTic ks(message[ "time"] ).localtime( ), min_time) DateTimeFromTic ks(message[ "time"] ).localtime( ) > mx.DateTime. DateTimeFromTic ks(min_ time): logger. debug(" Message %s newer than %s, notifying", message["id"], min_time) items:
self.notified_ items.append( message[ "id"])
self.show_ notification_ bubble( message) items:
log. logger. debug(" Message %s is a reply, adding messaging indicator", message["id"])
self. handle_ indicator_ item(message) ------- ------- ------- ------- -------
min_time = mx.DateTime.
log.
if mx.DateTime.
log.
if message["id"] not in self.notified_
if indicate and message["to_me"]:
if message["id"] not in self.indicator_
-------
I've attached both changed files, facebook.py and dispatcher.py python2. 6/dist- packages/ gwibber/ microblog/ , restart gwibber-service and it should work :)
Put both files into /usr/lib/