libpurple/resources/conversationmanager/statements/insert-properties.sql

Sun, 10 Aug 2025 23:44:08 +0800

author
Gong Zhile <gongzl@stu.hebust.edu.cn>
date
Sun, 10 Aug 2025 23:44:08 +0800
branch
purple_conversation_find_message_by_id
changeset 43309
099e1dfb856b
parent 43283
01eb1bbf4186
permissions
-rw-r--r--

Add Purple.Conversation.find_message_by_id

The method was added so that a protocol or plugin could easily lookup
for the reference for a message. This will be especially useful when a
protocol received a quoted message but only with an id.

INSERT INTO conversations(
  account_id,
  age_restricted,
  alias,
  conversation_id,
  created_on,
  creator_id,
  description,
  drafting,
  favorite,
  federated,
  logging,
  needs_attention,
  title,
  topic,
  topic_author_id,
  topic_updated,
  type,
  url,
  user_nickname
)
VALUES (
  :account_id,
  :conv_age_restricted,
  :conv_alias,
  :conv_id,
  :conv_created_on,
  :creator_id,
  :conv_description,
  :conv_drafting,
  :conv_favorite,
  :conv_federated,
  :conv_logging,
  :conv_needs_attention,
  :conv_title,
  :conv_topic,
  :topic_author_id,
  :conv_topic_updated,
  :conv_type,
  :conv_url,
  :conv_user_nickname
)
ON CONFLICT(account_id, conversation_id)
DO UPDATE SET
  age_restricted=:conv_age_restricted,
  alias=:conv_alias,
  created_on=:conv_created_on,
  creator_id=:creator_id,
  description=:conv_description,
  drafting=:conv_drafting,
  favorite=:conv_favorite,
  federated=:conv_federated,
  logging=:conv_logging,
  needs_attention=:conv_needs_attention,
  title=:conv_title,
  topic=:conv_topic,
  topic_author_id=:topic_author_id,
  topic_updated=:conv_topic_updated,
  type=:conv_type,
  url=:conv_url,
  user_nickname=:conv_user_nickname

mercurial