Giter Site home page Giter Site logo

Comments (10)

podviaznikov avatar podviaznikov commented on June 9, 2024 1

yes, deleted

from imessage-exporter.

podviaznikov avatar podviaznikov commented on June 9, 2024 1

verified. thank you!

from imessage-exporter.

ReagentX avatar ReagentX commented on June 9, 2024

The only place we add table elements is for edited messages:

out_s.push_str("<table>");
for i in 0..edited_message.items() {
let last = i == edited_message.items() - 1;
if let Some((timestamp, text, _)) = edited_message.item_at(i) {
match previous_timestamp {
None => out_s.push_str(&self.edited_to_html("", text, last)),
Some(prev_timestamp) => {
let end = get_local_time(timestamp, &self.config.offset);
let start = get_local_time(prev_timestamp, &self.config.offset);
let diff = readable_diff(start, end).unwrap_or_default();
out_s.push_str(&self.edited_to_html(
&format!("Edited {diff} later"),
text,
last,
));
}
}
// Update the previous timestamp for the next loop
previous_timestamp = Some(timestamp);
}
}
out_s.push_str("</table>");

Did the messages you are viewing contain HTML themselves? If so this will be fixed in #219.

from imessage-exporter.

ReagentX avatar ReagentX commented on June 9, 2024

The generated HTML of an edited message looks like this:

<div class="message">
    <div class="sent iMessage">
        <p><span class="timestamp">Nov 18, 2022 6:17:54 PM</span>
            <span class="sender">Me</span>
        </p>
        <hr>
        <div class="message_part">
            <div class="edited">
                <table>
                    <tbody>
                        <tr>
                            <td><span class="timestamp"></span></td>
                            <td>First message </td>
                        </tr>
                    </tbody>
                    <tbody>
                        <tr>
                            <td><span class="timestamp">Edited 6 seconds later</span></td>
                            <td>Edit 1</td>
                        </tr>
                    </tbody>
                    <tbody>
                        <tr>
                            <td><span class="timestamp">Edited 5 seconds later</span></td>
                            <td>Edit 2</td>
                        </tr>
                    </tbody>
                    <tfoot>
                        <tr>
                            <td><span class="timestamp">Edited 9 seconds later</span></td>
                            <td>Edited message</td>
                        </tr>
                    </tfoot>
                </table>
            </div>
        </div>
        <div class="reactions">
            <hr>
            <p>Reactions:</p>
            <div class="reaction"><span class="reaction"><b>Liked</b> by Me</span></div>

        </div>
    </div>
</div>

I dont see an unclosed div here.

from imessage-exporter.

podviaznikov avatar podviaznikov commented on June 9, 2024
Screenshot 2023-11-29 at 2 58 05 PM

Hard to reproduce because basically now generated html is broken.

But here on the screenshot I have 3 separated messages and last two are nested inside 3rd to last in HTML because 3rd to last is missing one closing div.

from imessage-exporter.

ReagentX avatar ReagentX commented on June 9, 2024

What do the bubbles look like in the messages app? It looks like there was a thread off of a message that was deleted.

from imessage-exporter.

podviaznikov avatar podviaznikov commented on June 9, 2024

yes, it was deleted. only message "Hi2" 2nd to last is visible.

from imessage-exporter.

ReagentX avatar ReagentX commented on June 9, 2024

Just to be clear—these were messages that were deleted from the conversation, not messages that were unsent from the conversation, correct?

from imessage-exporter.

ReagentX avatar ReagentX commented on June 9, 2024

Rendering the thread is definitely broken for edited messages. This is the culprit:

To replicate the bug:

  1. Send a message
  2. Edit that message
  3. Send a second message
  4. Reply to 1. with a third message
  5. Edit the third message

from imessage-exporter.

ReagentX avatar ReagentX commented on June 9, 2024
image

from imessage-exporter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.