You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@whimsical.apache.org by Craig Russell <cr...@oracle.com> on 2017/01/04 23:08:51 UTC
Secmail new year's blues
In Secmail app, with the first of the year, there are no messages. Ever.
The (load previous month’s messages) button works.
Thinking that this is a bug in index.js.rb, I found this code:
# on initial load, fetch latest mailbox, subscribe to keyboard and
# server side events, and initialize selected item.
def componentDidMount()
today = Date.new()
twice = (today.getMonth()+1==@nextmbox[4..5].to_i and today.getDate()<=7)
self.fetch_month() do
if @nextmbox and twice
# for the first week of the month, fetch previous month too
self.fetch_month() do
@fetched = true
end
else
@fetched = true
end
end
But I cannot figure out what is wrong with it. Maybe today.getMonth()+1 doesn’t equal January? Maybe getMonth()+1 modulo 12 is required?
Craig L Russell
Architect
craig.russell@oracle.com
P.S. A good JDO? O, Gasp!
Re: Secmail new year's blues
Posted by Sam Ruby <ru...@intertwingly.net>.
On Thu, Jan 5, 2017 at 10:11 AM, sebb <se...@gmail.com> wrote:
> On 5 January 2017 at 14:59, Sam Ruby <ru...@intertwingly.net> wrote:
>> Update: The root cause seems to be a bit of spam that was received on
>> the 2nd which had a date of February 1. I've pushed a fix to exclude
>> mail folders from the future.
>
> What about valid mails that happen to come from a host with a clock
> that does not agree with the Whimsy clock?
> Once a month at around midnight on the last day might this cause a
> problem if the other clock is only a few minutes fast?
Minutes are not a problem.
For the first week in a month, the tool will fetch and merge the
previous month's email.
Look for 'twice' below.
- Sam Ruby
>> On Wed, Jan 4, 2017 at 11:07 PM, Sam Ruby <ru...@intertwingly.net> wrote:
>>> I'll debug this in the morning, but if you view source on
>>> https://whimsy.apache.org/secmail/, you will see:
>>>
>>> mbox: "201702"
>>>
>>> That's clearly wrong.
>>>
>>> - Sam Ruby
>>>
>>>
>>> On Wed, Jan 4, 2017 at 6:08 PM, Craig Russell <cr...@oracle.com> wrote:
>>>> In Secmail app, with the first of the year, there are no messages. Ever.
>>>>
>>>> The (load previous month’s messages) button works.
>>>>
>>>> Thinking that this is a bug in index.js.rb, I found this code:
>>>>
>>>> # on initial load, fetch latest mailbox, subscribe to keyboard and
>>>> # server side events, and initialize selected item.
>>>> def componentDidMount()
>>>> today = Date.new()
>>>> twice = (today.getMonth()+1==@nextmbox[4..5].to_i and today.getDate()<=7)
>>>> self.fetch_month() do
>>>> if @nextmbox and twice
>>>> # for the first week of the month, fetch previous month too
>>>> self.fetch_month() do
>>>> @fetched = true
>>>> end
>>>> else
>>>> @fetched = true
>>>> end
>>>> end
>>>>
>>>> But I cannot figure out what is wrong with it. Maybe today.getMonth()+1 doesn’t equal January? Maybe getMonth()+1 modulo 12 is required?
>>>>
>>>>
>>>> Craig L Russell
>>>> Architect
>>>> craig.russell@oracle.com
>>>> P.S. A good JDO? O, Gasp!
>>>>
>>>>
>>>>
>>>>
>>>>
Re: Secmail new year's blues
Posted by sebb <se...@gmail.com>.
On 5 January 2017 at 14:59, Sam Ruby <ru...@intertwingly.net> wrote:
> Update: The root cause seems to be a bit of spam that was received on
> the 2nd which had a date of February 1. I've pushed a fix to exclude
> mail folders from the future.
What about valid mails that happen to come from a host with a clock
that does not agree with the Whimsy clock?
Once a month at around midnight on the last day might this cause a
problem if the other clock is only a few minutes fast?
> - Sam Ruby
>
> On Wed, Jan 4, 2017 at 11:07 PM, Sam Ruby <ru...@intertwingly.net> wrote:
>> I'll debug this in the morning, but if you view source on
>> https://whimsy.apache.org/secmail/, you will see:
>>
>> mbox: "201702"
>>
>> That's clearly wrong.
>>
>> - Sam Ruby
>>
>>
>> On Wed, Jan 4, 2017 at 6:08 PM, Craig Russell <cr...@oracle.com> wrote:
>>> In Secmail app, with the first of the year, there are no messages. Ever.
>>>
>>> The (load previous month’s messages) button works.
>>>
>>> Thinking that this is a bug in index.js.rb, I found this code:
>>>
>>> # on initial load, fetch latest mailbox, subscribe to keyboard and
>>> # server side events, and initialize selected item.
>>> def componentDidMount()
>>> today = Date.new()
>>> twice = (today.getMonth()+1==@nextmbox[4..5].to_i and today.getDate()<=7)
>>> self.fetch_month() do
>>> if @nextmbox and twice
>>> # for the first week of the month, fetch previous month too
>>> self.fetch_month() do
>>> @fetched = true
>>> end
>>> else
>>> @fetched = true
>>> end
>>> end
>>>
>>> But I cannot figure out what is wrong with it. Maybe today.getMonth()+1 doesn’t equal January? Maybe getMonth()+1 modulo 12 is required?
>>>
>>>
>>> Craig L Russell
>>> Architect
>>> craig.russell@oracle.com
>>> P.S. A good JDO? O, Gasp!
>>>
>>>
>>>
>>>
>>>
Re: Secmail new year's blues
Posted by Sam Ruby <ru...@intertwingly.net>.
Update: The root cause seems to be a bit of spam that was received on
the 2nd which had a date of February 1. I've pushed a fix to exclude
mail folders from the future.
- Sam Ruby
On Wed, Jan 4, 2017 at 11:07 PM, Sam Ruby <ru...@intertwingly.net> wrote:
> I'll debug this in the morning, but if you view source on
> https://whimsy.apache.org/secmail/, you will see:
>
> mbox: "201702"
>
> That's clearly wrong.
>
> - Sam Ruby
>
>
> On Wed, Jan 4, 2017 at 6:08 PM, Craig Russell <cr...@oracle.com> wrote:
>> In Secmail app, with the first of the year, there are no messages. Ever.
>>
>> The (load previous month’s messages) button works.
>>
>> Thinking that this is a bug in index.js.rb, I found this code:
>>
>> # on initial load, fetch latest mailbox, subscribe to keyboard and
>> # server side events, and initialize selected item.
>> def componentDidMount()
>> today = Date.new()
>> twice = (today.getMonth()+1==@nextmbox[4..5].to_i and today.getDate()<=7)
>> self.fetch_month() do
>> if @nextmbox and twice
>> # for the first week of the month, fetch previous month too
>> self.fetch_month() do
>> @fetched = true
>> end
>> else
>> @fetched = true
>> end
>> end
>>
>> But I cannot figure out what is wrong with it. Maybe today.getMonth()+1 doesn’t equal January? Maybe getMonth()+1 modulo 12 is required?
>>
>>
>> Craig L Russell
>> Architect
>> craig.russell@oracle.com
>> P.S. A good JDO? O, Gasp!
>>
>>
>>
>>
>>
Re: Secmail new year's blues
Posted by Sam Ruby <ru...@intertwingly.net>.
I'll debug this in the morning, but if you view source on
https://whimsy.apache.org/secmail/, you will see:
mbox: "201702"
That's clearly wrong.
- Sam Ruby
On Wed, Jan 4, 2017 at 6:08 PM, Craig Russell <cr...@oracle.com> wrote:
> In Secmail app, with the first of the year, there are no messages. Ever.
>
> The (load previous month’s messages) button works.
>
> Thinking that this is a bug in index.js.rb, I found this code:
>
> # on initial load, fetch latest mailbox, subscribe to keyboard and
> # server side events, and initialize selected item.
> def componentDidMount()
> today = Date.new()
> twice = (today.getMonth()+1==@nextmbox[4..5].to_i and today.getDate()<=7)
> self.fetch_month() do
> if @nextmbox and twice
> # for the first week of the month, fetch previous month too
> self.fetch_month() do
> @fetched = true
> end
> else
> @fetched = true
> end
> end
>
> But I cannot figure out what is wrong with it. Maybe today.getMonth()+1 doesn’t equal January? Maybe getMonth()+1 modulo 12 is required?
>
>
> Craig L Russell
> Architect
> craig.russell@oracle.com
> P.S. A good JDO? O, Gasp!
>
>
>
>
>