mirror of
https://github.com/discourse/discourse.git
synced 2024-11-27 21:33:38 +08:00
95b71b35d6
Adds functionality to reflect topic delete in Discourse to IMAP inbox (Gmail only for now) and reflecting Gmail deletes in Discourse. Adding lots of tests, various refactors and code improvements. When Discourse topic is destroyed in PostDestroyer mark the topic incoming email as imap_sync: true, and do the opposite when post is recovered.
24 lines
579 B
Ruby
24 lines
579 B
Ruby
# frozen_string_literal: true
|
|
|
|
Fabricator(:incoming_email) do
|
|
message_id "12345@example.com"
|
|
subject "Hello world"
|
|
from_address "foo@example.com"
|
|
to_addresses "someone@else.com"
|
|
imap_sync false
|
|
|
|
raw <<~RAW
|
|
Return-Path: <foo@example.com>
|
|
From: Foo <foo@example.com>
|
|
To: someone@else.com
|
|
Subject: Hello world
|
|
Date: Fri, 15 Jan 2016 00:12:43 +0100
|
|
Message-ID: <12345@example.com>
|
|
Mime-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: quoted-printable
|
|
|
|
The body contains "Hello world" too.
|
|
RAW
|
|
end
|