Closed Gurkenglas closed 8 years ago
I made a pull request to fix this: https://github.com/chrisdone/lpaste/pull/36.
Left some refactorings on https://github.com/chrisdone/lpaste/pull/36/files#diff-e68eb2d137b310b5ebd78ae6caefbbcbL14 . Is this the right way to suggest these?
Hmm by the way clicking Private or Public when editing a paste doesn't change whether it's listed on the public list I think. There should be either just one button or they should do different things.
Oh and it looks like a whole bunch of other stuff also isn't updated, like what channel to have the lpaste-IRCbot post to.
I just checked and it's updated (when editing both pastes and annotations). Or did you mean something else?
What channel the bot posts to is used for the current revision, but the next revision has the setting used in the original post set as default again.
It doesn't for me. Here are the exact steps:
sudo -u postgres psql
\c hpaste
insert into channel values (1,'haskell')
insert into channel values (2,'java')
insert into channel values (3,'c++')
\q
Then I ran the server and made a new paste with channel = "haskell" (ID turned out to be 49). Then I edited it to have channel = "java" and saved the paste. Then I curl
ed the edit page (just to make sure that it's not browser substituting the last used value or something):
$ curl -s http://localhost:10000/edit/49 | tidy -q | grep selected
<option value="java" selected="selected">java</option>
So, it does save the channel.
Here's my steps: https://www.dropbox.com/s/14z34e55iakmyn0/lpastechannel.gif?dl=0
But but my patch hasn't been merged yet, let alone deployed on lpaste.net! I agree that the version on lpaste.net handles channels incorrectly, but this bug isn't present in the pull request.
Ah, I didn't think you changed that since https://github.com/chrisdone/lpaste/pull/36 didn't say you did.
Waaait, this thread wasn't even about that.
Okay, I made another pull request, let's see how it goes.
It has been deployed, and editing of annotations works now.
Currently, editing an annotation leaves the original annotation unchanged and behaves as if your annotation had always been its own paste, which is now edited.