Closed Bug 955241 Opened 10 years ago Closed 10 years ago

Update fake

Categories

(Instantbird Graveyard :: Other, defect)

defect
Not set
minor

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: clokep, Assigned: florian)

Details

Attachments

(2 files)

*** Original post on bio 1808 at 2012-11-18 18:53:00 UTC ***

*** Due to BzAPI limitations, the initial description is in comment 1 ***
Attached patch WIP v1Splinter Review
*** Original post on bio 1808 as attmnt 2103 at 2012-11-18 18:53:00 UTC ***

Fake should be updated to run on a current version of Instantbird. I attempted this for the 1.3 release, but couldn't get it working. It might need someone who knows this code better.
*** Original post on bio 1808 at 2013-03-12 22:45:43 UTC ***

Drive-by comment:

> 254     let makeDate = function(aDateString) {
> 255       let array = aDateString.split(":");
> 256       let now = new Date();
> 257       // Use a date on day in the future so that time bubbles doesn't
> 258       // show the latest message as several hours old.
> 259       // FIXME: this will break when run the last day of the month.
> 260       return (new Date(now.getFullYear(), now.getMonth(), now.getDate() + 1,
> 261                        array[0], array[1], array[2])) / 1000;
> 262     };

Use this instead:

let tomorrow = new Date(Date.now() + 86400000 /* One day in milliseconds */);
Attached patch FixSplinter Review
*** Original post on bio 1808 as attmnt 2610 at 2013-07-19 16:15:00 UTC ***

I fixed Fake enough for stuff to be displayed.

There were 2 problems:
- The contacts service expects the account to be a prplIAccount and to have an imAccount attribute, that was missing in Fake's implementation.
- GenericConvChatPrototype now expects the user's nick as a third argument.

This is good enough to get Fake running again, but isn't perfectly clean. The log writter throws errors (I don't think we care), and there are errors at startup when attempting to load contacts, if it's not the first time you attempt to use Fake on this profile (I don't really care either).
Attachment #8354379 - Flags: review?
Comment on attachment 8354379 [details] [diff] [review]
Fix

*** Original change on bio 1808 attmnt 2610 at 2013-07-19 17:06:53 UTC was without comment, so any subsequent comment numbers will be shifted ***
Attachment #8354379 - Flags: review? → review+
*** Original post on bio 1808 at 2013-07-19 22:06:22 UTC ***

http://hg.instantbird.org/instantbird/rev/9c5746169cdc
Assignee: nobody → florian
We should open a new bug next time we want to get Fake updated. And it would be nice to add tests for it, so that it stops getting broken without anybody noticing.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → 1.5
You need to log in before you can comment on or make changes to this bug.