delete message
This commit is contained in:
parent
f5edf91670
commit
de5fc1c44f
|
@ -111,7 +111,7 @@ class WebmailController < ApplicationController
|
||||||
|
|
||||||
def delete
|
def delete
|
||||||
@msg_id = msg_id_param.to_i
|
@msg_id = msg_id_param.to_i
|
||||||
folder.messages().delete(@msg_id)
|
folder.delete(@msg_id)
|
||||||
redirect_to(:action=>"messages")
|
redirect_to(:action=>"messages")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -287,6 +287,7 @@ class IMAPFolder
|
||||||
|
|
||||||
# Just delete message without interaction with Trash folder
|
# Just delete message without interaction with Trash folder
|
||||||
def delete(message)
|
def delete(message)
|
||||||
|
activate
|
||||||
uid = (message.kind_of?(Integer) ? message : message.uid)
|
uid = (message.kind_of?(Integer) ? message : message.uid)
|
||||||
@mailbox.imap.uid_store(uid, "+FLAGS", :Deleted)
|
@mailbox.imap.uid_store(uid, "+FLAGS", :Deleted)
|
||||||
@mailbox.imap.expunge
|
@mailbox.imap.expunge
|
||||||
|
|
Loading…
Reference in a new issue