DELETE FROM t USING PAD_CHAT_TEXT AS t INNER JOIN PAD_CHAT_META AS m
ON t.NUMID = m.NUMID WHERE m.ID == "12345678"
(where 12345678 is the ID of the pad). Then, in the JSON string in
PAD_META where PAD_META.ID = "12345678" set "numChatMessages" to 0
I don't know what you need to trigger a UI refresh, but at least, it
is a start…
DELETE FROM t USING PAD_CHAT_TEXT AS t INNER JOIN PAD_CHAT_META AS m
ON t.NUMID = m.NUMID WHERE m.ID == "5"
UPDATE PAD_META where PAD_META.ID = "5" set "numChatMessages" = 0
Did that but when I restart etherpad I get
Oops! A server error occured. It's been logged.
Please email <sup...@etherpad.com> if this persists.
for that pad..
If I go in manually and just do:
UPDATE `etherpad`.`PAD_CHAT_TEXT` SET `DATA` = '{"time":
1265300759870,"userId":"g.yv30ms68posnjjt8","lineText":"sdfsdfsvfxcvxcvxcv"}
{"time":
1265300762785,"userId":"g.yv30ms68posnjjt8","lineText":"wheeee1"}'
WHERE `PAD_CHAT_TEXT`.`NUMID` =7 AND `PAD_CHAT_TEXT`.`PAGESTART` =0
AND `PAD_CHAT_TEXT`.`OFFSETS` = '84,72,,,,,,,,,,,,,,,,,,' AND
`PAD_CHAT_TEXT`.`DATA` = '{"time":
1265300759870,"userId":"g.yv30ms68posnjjt8","lineText":"sdfsdfsvfxcvxcvxcv"}
{"time":
1265300762785,"userId":"g.yv30ms68posnjjt8","lineText":"wheeee"}'
LIMIT 1 ;
Restart the server & it breaks the pad..
Then
UPDATE `etherpad`.`PAD_CHAT_TEXT` SET `DATA` = '{"time":
1265300759870,"userId":"g.yv30ms68posnjjt8","lineText":"sdfsdfsvfxcvxcvxcv"}
{"time":
1265300762785,"userId":"g.yv30ms68posnjjt8","lineText":"wheeee"}'
WHERE `PAD_CHAT_TEXT`.`NUMID` =7 AND `PAD_CHAT_TEXT`.`PAGESTART` =0
AND `PAD_CHAT_TEXT`.`OFFSETS` = '84,72,,,,,,,,,,,,,,,,,,' AND
`PAD_CHAT_TEXT`.`DATA` = '{"time":
1265300759870,"userId":"g.yv30ms68posnjjt8","lineText":"sdfsdfsvfxcvxcvxcv"}
{"time":
1265300762785,"userId":"g.yv30ms68posnjjt8","lineText":"wheeee1"}'
LIMIT 1 ;
Fixes the pad.
Then I tried changing "numChatMessages":2}}
To "numChatMessages":0}}
Restarted server with the change made and the pad chat was clear, new
entries go in starting at 1.
So to summarize, best method for clearing pad chat is just to change
the JSON string from numChatMessages:XX to numChatMessages:0
I will write a plugin and publish the changes on my blog, thanks for
the help Marcel
On Jan 11, 11:01 pm, Marcel Waldvogel
On Feb 4, 4:35 pm, John McLear <johnym...@gmail.com> wrote:
> Quick update:
>
> DELETE FROM t USING PAD_CHAT_TEXT AS t INNER JOIN PAD_CHAT_META AS m
> ON t.NUMID = m.NUMID WHERE m.ID == "5"
>
> UPDATE PAD_META where PAD_META.ID = "5" set "numChatMessages" = 0
>
> Did that but when I restart etherpad I get
>
> Oops! A server error occured. It's been logged.
> Please email <supp...@etherpad.com> if this persists.
> Restarted server with the change made and the padchatwasclear, new
> entries go in starting at 1.
>
> So to summarize, best method for clearing padchatis just to change
On a individual node, this is maintained as an array of chat messages
which then gets printed onto the screen. I started going down the path
of creating a new command for clearing chat messages from any single
client, which then sends the message to all clients to clear all their
chats. Other things have come in the way and Im still working on it.
Ill try to see if I can finish up this weekend.
-- Raja