Skip to content

Fix the image_url_hack_insert/extract() to be a full message abstraction, or make imageurl an actual schema member #90

Description

@nyetwurk

The database schema for message does not contain imageurl.

That functionality was added later such that in the code, we rely on there being a $msg['imageurl'].

However, it is only a run time construct; it does not exist in the database. The code, however, wants to see it, so often (but not always) after retrieving a message from the code base, it looks for <center><img src=..></center> in the message body and assumes it is a urlimg (image_url_hack_extract()).

Then, just before a message is written to the db, img_url_hack_insert() converts $msg['imageurl'] to a prepended <center><img src=></center> in the message body.

They are intended to be paired so we do not have to add it to the schema. However, they are not always paired. Create a MessageObject of some type that abstracts this away entirely.

Alternately, just make imageurl an actual db object instead of the current hack in message body.

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions