# HG changeset patch
# Node ID b65398103ba4
# Parent  6262987e5347
diff --git a/ibis/ibiscapabilities.c b/ibis/ibiscapabilities.c
--- a/ibis/ibiscapabilities.c
+++ b/ibis/ibiscapabilities.c
@@ -279,13 +279,16 @@
 	/* cap-notify is implied when we use CAP LS 302, so this is really just to
 	 * make sure it's requested.
 	 */
-	ibis_capabilities_lookup_and_request(capabilities, "cap-notify");
+	ibis_capabilities_lookup_and_request(capabilities,
+	                                     IBIS_CAPABILITY_CAP_NOTIFY);
 
 	/* message-tags is used for a lot of stuff so we need to tell everyone we
 	 * do in fact support it.
 	 */
-	if(ibis_capabilities_lookup_and_request(capabilities, "message-tags")) {
-		g_signal_connect(capabilities, "ack::message-tags",
+	if(ibis_capabilities_lookup_and_request(capabilities,
+	                                        IBIS_CAPABILITY_MESSAGE_TAGS))
+	{
+		g_signal_connect(capabilities, "ack::" IBIS_CAPABILITY_MESSAGE_TAGS,
 		                 G_CALLBACK(ibis_capabilities_message_tags_ack_cb),
 		                 NULL);
 	}
diff --git a/ibis/ibisconstants.h b/ibis/ibisconstants.h
--- a/ibis/ibisconstants.h
+++ b/ibis/ibisconstants.h
@@ -28,7 +28,123 @@
 #define IBIS_CONSTANTS_H
 
 /**
- * IBIS_CAPABILITY_CAP_LS_VERSION: (skip)
+ * IBIS_BATCH_CHATHISTORY:
+ *
+ * The constant string to use for the `chathistory` batch.
+ *
+ * See https://ircv3.net/specs/extensions/chathistory for more information.
+ *
+ * Since: 0.2
+ */
+#define IBIS_BATCH_CHATHISTORY "chathistory" IBIS_AVAILABLE_MACRO_IN_0_2
+
+/**
+ * IBIS_BATCH_LABELED_RESPONSE:
+ *
+ * The constant string to use for the `labeled-response` batch.
+ *
+ * See https://ircv3.net/specs/extensions/labeled-response for more
+ * information.
+ *
+ * Since: 0.2
+ */
+#define IBIS_BATCH_LABELED_RESPONSE "labeled-response" \
+	IBIS_AVAILABLE_MACRO_IN_0_2
+
+/**
+ * IBIS_BATCH_MULTILINE:
+ *
+ * The constant string to use for the `multiline` batch.
+ *
+ * See https://ircv3.net/specs/extensions/multiline for more information.
+ *
+ * Since: 0.2
+ */
+#define IBIS_BATCH_MULTILINE "multiline" IBIS_AVAILABLE_MACRO_IN_0_2
+
+/**
+ * IBIS_BATCH_NETJOIN:
+ *
+ * The constant string to use for the `netjoin` batch.
+ *
+ * See https://ircv3.net/specs/batches/netsplit for more information.
+ *
+ * Since: 0.2
+ */
+#define IBIS_BATCH_NETJOIN "netjoin" IBIS_AVAILABLE_MACRO_IN_0_2
+
+/**
+ * IBIS_BATCH_NETSPLIT:
+ *
+ * The constant string to use for the `netsplit` batch.
+ *
+ * See https://ircv3.net/specs/batches/netsplit for more information.
+ *
+ * Since: 0.2
+ */
+#define IBIS_BATCH_NETSPLIT "netsplit" IBIS_AVAILABLE_MACRO_IN_0_2
+
+/**
+ * IBIS_CAPABILITY_ACCOUNT_NOTIFY:
+ *
+ * The constant string to use when negotiating the `account-notify` capability.
+ *
+ * See https://ircv3.net/specs/extensions/account-notify for more information.
+ *
+ * Since: 0.2
+ */
+#define IBIS_CAPABILITY_ACCOUNT_NOTIFY "account-notify" \
+	IBIS_AVAILABLE_MACRO_IN_0_2
+
+/**
+ * IBIS_CAPABILITY_ACCOUNT_REGISTRATION:
+ *
+ * The constant string to use when negotiating the `account-registration`
+ * capability.
+ *
+ * See https://ircv3.net/specs/extensions/account-registration for more
+ * information.
+ *
+ * Since: 0.2
+ */
+#define IBIS_CAPABILITY_ACCOUNT_REGISTRATION "draft/account-registration" \
+	IBIS_AVAILABLE_MACRO_IN_0_2
+
+/**
+ * IBIS_CAPABILITY_ACCOUNT_TAG:
+ *
+ * The constant string to use when negotiating the `account-tag` capability.
+ *
+ * See https://ircv3.net/specs/extensions/account-tag for more information.
+ *
+ * Since: 0.2
+ */
+#define IBIS_CAPABILITY_ACCOUNT_TAG "account-tag" IBIS_AVAILABLE_MACRO_IN_0_2
+
+/**
+ * IBIS_CAPABILITY_AWAY_NOTIFY:
+ *
+ * The constant string to use when negotiating the `away-notify` capability.
+ *
+ * See https://ircv3.net/specs/extensions/away-notify for more information.
+ *
+ * Since: 0.2
+ */
+#define IBIS_CAPABILITY_AWAY_NOTIFY "away-notify" IBIS_AVAILABLE_MACRO_IN_0_2
+
+/**
+ * IBIS_CAPABILITY_BATCH:
+ *
+ * The constant string to use when negotiating the `batch` capability.
+ *
+ * See https://ircv3.net/specs/extensions/batch for more information.
+ *
+ * Since: 0.2
+ */
+#define IBIS_CAPABILITY_BATCH "batch" IBIS_AVAILABLE_MACRO_IN_0_2
+
+/**
+ * IBIS_CAPABILITY_CAP_LS_VERSION:
  *
  * The version to pass to the `CAP LS` command.
  *
@@ -37,34 +153,290 @@
  *
  * Since: 0.1
  */
-#define IBIS_CAPABILITY_CAP_LS_VERSION "302"
+#define IBIS_CAPABILITY_CAP_LS_VERSION "302" IBIS_AVAILABLE_MACRO_IN_0_1
+
+/**
+ * IBIS_CAPABILITY_CAP_NOTIFY:
+ *
+ * The constant string to use when negotiating the `cap-notify` capability.
+ *
+ * > Note: Ibis automatically requests and handles this capability.
+ *
+ * See https://ircv3.net/specs/extensions/capability-negotiation#cap-notify
+ * for more information.
+ *
+ * Since: 0.2
+ */
+#define IBIS_CAPABILITY_CAP_NOTIFY "cap-notify" IBIS_AVAILABLE_MACRO_IN_0_2
+
+/**
+ * IBIS_CAPABILITY_CHANNEL_RENAME:
+ *
+ * The constant string to use when negotiating the `channel-rename` capability.
+ *
+ * See https://ircv3.net/specs/extensions/channel-rename for more information.
+ *
+ * Since: 0.2
+ */
+#define IBIS_CAPABILITY_CHANNEL_RENAME "draft/channel-rename" \
+	IBIS_AVAILABLE_MACRO_IN_0_2
+
+/**
+ * IBIS_CAPABILITY_CHATHISTORY:
+ *
+ * The constant string to use when negotiating the `chathistory` capability.
+ *
+ * See https://ircv3.net/specs/extensions/chathistory for more information.
+ *
+ * Since: 0.2
+ */
+#define IBIS_CAPABILITY_CHATHISTORY "draft/chathistory" IBIS_AVAILABLE_MACRO_IN_0_2
+
+/**
+ * IBIS_CAPABILITY_CHGHOST:
+ *
+ * The constant string to use when negotiating the `chghost` capability.
+ *
+ * See https://ircv3.net/specs/extensions/chghost for more information.
+ *
+ * Since: 0.2
+ */
+#define IBIS_CAPABILITY_CHGHOST "chghost" IBIS_AVAILABLE_MACRO_IN_0_2
+
+/**
+ * IBIS_CAPABILITY_ECHO_MESSAGE:
+ *
+ * The constant string to use when negotiating the `echo-message` capability.
+ *
+ * See https://ircv3.net/specs/extensions/echo-message for more information.
+ *
+ * Since: 0.2
+ */
+#define IBIS_CAPABILITY_ECHO_MESSAGE "echo-message" IBIS_AVAILABLE_MACRO_IN_0_2
+
+/**
+ * IBIS_CAPABILITY_EVENT_PLAYBACK:
+ *
+ * The constant string to use when negotiating the `event-playback` capability.
+ *
+ * See https://ircv3.net/specs/extensions/chathistory for more information.
+ *
+ * Since: 0.2
+ */
+#define IBIS_CAPABILITY_EVENT_PLAYBACK "draft/event-playback" \
+	IBIS_AVAILABLE_MACRO_IN_0_2
+
+/**
+ * IBIS_CAPABILITY_EXTENDED_JOIN:
+ *
+ * The constant string to use when negotiating the `extended-join` capability.
+ *
+ * See https://ircv3.net/specs/extensions/extended-join for more information.
+ *
+ * Since: 0.2
+ */
+#define IBIS_CAPABILITY_EXTENDED_JOIN "extended-join" \
+	IBIS_AVAILABLE_MACRO_IN_0_2
+
+/**
+ * IBIS_CAPABILITY_EXTENDED_MONITOR:
+ *
+ * The constant string to use when negotiating the `extended-monitor`
+ * capability.
+ *
+ * See https://ircv3.net/specs/extensions/extended-monitor for more
+ * information.
+ *
+ * Since: 0.2
+ */
+#define IBIS_CAPABILITY_EXTENDED_MONITOR "extended-monitor" \
+	IBIS_AVAILABLE_MACRO_IN_0_2
 
 /**
- * IBIS_CAPABILITY_SASL: (skip)
- *
- * The constant string to use when negotiating the SASL capability.
- *
- * See https://ircv3.net/specs/extensions/sasl-3.2 for more information.
+ * IBIS_CAPABILITY_INVITE_NOTIFY:
+ *
+ * The constant string to use when negotiating the `invite-notify` capability.
+ *
+ * See https://ircv3.net/specs/extensions/invite-notify for more information.
+ *
+ * Since: 0.2
+ */
+#define IBIS_CAPABILITY_INVITE_NOTIFY "invite-notify" \
+	IBIS_AVAILABLE_MACRO_IN_0_2
+
+/**
+ * IBIS_CAPABILITY_LABELED_RESPONSE:
+ *
+ * The constant string to use when negotiating the `labeled-response`
+ * capability.
+ *
+ * See https://ircv3.net/specs/extensions/labeled-response for more
+ * information.
+ *
+ * Since: 0.2
+ */
+#define IBIS_CAPABILITY_LABELED_RESPONSE "labeled-response" \
+	IBIS_AVAILABLE_MACRO_IN_0_2
+
+/**
+ * IBIS_CAPABILITY_MESSAGE_TAGS:
+ *
+ * The constant string to use when negotiating the `message-tags` capability.
+ *
+ * > Note: Ibis automatically requests this capability and handles it via
+ * [class@Tags].
+ *
+ * See https://ircv3.net/specs/extensions/message-tags for more information.
+ *
+ * Since: 0.2
+ */
+#define IBIS_CAPABILITY_MESSAGE_TAGS "message-tags" IBIS_AVAILABLE_MACRO_IN_0_2
+
+/**
+ * IBIS_CAPABILITY_MONITOR:
+ *
+ * The constant string to use when negotiating the `monitor` capability.
+ *
+ * See https://ircv3.net/specs/extensions/monitor for more information.
+ *
+ * Since: 0.2
+ */
+#define IBIS_CAPABILITY_MONITOR "monitor" IBIS_AVAILABLE_MACRO_IN_0_2
+
+/**
+ * IBIS_CAPABILITY_MULTI_PREFIX:
+ *
+ * The constant string to use when negotiating the `multi-prefix` capability.
+ *
+ * See https://ircv3.net/specs/extensions/multi-prefix for more information.
+ *
+ * Since: 0.2
+ */
+#define IBIS_CAPABILITY_MULTI_PREFIX "multi-prefix" IBIS_AVAILABLE_MACRO_IN_0_2
+
+/**
+ * IBIS_CAPABILITY_MULTILINE:
+ *
+ * The constant string to use when negotiating the `multiline` capability.
+ *
+ * See https://ircv3.net/specs/extensions/multiline for more information.
+ *
+ * Since: 0.2
+ */
+#define IBIS_CAPABILITY_MULTILINE "draft/multiline" IBIS_AVAILABLE_MACRO_IN_0_2
+
+/**
+ * IBIS_CAPABILITY_NO_IMPLICIT_NAMES:
+ *
+ * The constant string to use when negotiating the `no-implicit-names`
+ * capability.
+ *
+ * See https://ircv3.net/specs/extensions/no-implicit-names for more
+ * information.
+ *
+ * Since: 0.2
+ */
+#define IBIS_CAPABILITY_NO_IMPLICIT_NAMES "draft/no-implicit-names" \
+	IBIS_AVAILABLE_MACRO_IN_0_2
+
+/**
+ * IBIS_CAPABILITY_PRE_AWAY:
+ *
+ * The constant string to use when negotiating the `pre-away` capability.
+ *
+ * See https://ircv3.net/specs/extensions/pre-away for more information.
+ *
+ * Since: 0.2
+ */
+#define IBIS_CAPABILITY_PRE_AWAY "draft/pre-away" IBIS_AVAILABLE_MACRO_IN_0_2
+
+/**
+ * IBIS_CAPABILITY_READ_MARKER:
+ *
+ * The constant string to use when negotiating the `read-marker` capability.
+ *
+ * See https://ircv3.net/specs/extensions/read-marker for more information.
+ *
+ * Since: 0.2
+ */
+#define IBIS_CAPABILITY_READ_MARKER "draft/read-maker" \
+	IBIS_AVAILABLE_MACRO_IN_0_2
+
+/**
+ * IBIS_CAPABILITY_SASL:
+ *
+ * The constant string to use when negotiating the `sasl` capability.
+ *
+ * See https://ircv3.net/specs/extensions/sasl-3.1 and
+ * https://ircv3.net/specs/extensions/sasl-3.2 for more information.
+ *
+ * > Note: Ibis will automatically request this if you have set
+ * [property@Client:hasl-context].
  *
  * Since: 0.1
  */
-#define IBIS_CAPABILITY_SASL "sasl"
+#define IBIS_CAPABILITY_SASL "sasl" IBIS_AVAILABLE_MACRO_IN_0_1
 
 /**
- * IBIS_CAPABILITY_SERVER_TIME: (skip)
- *
- * The constant string to use when negotiating the server-time capability.
+ * IBIS_CAPABILITY_SERVER_TIME:
+ *
+ * The constant string to use when negotiating the `server-time` capability.
+ *
+ * > Note: Ibis will automatically request this if
+ * [const@CAPABILITY_MESSAGE_TAGS] is supported by the server.
  *
  * See https://ircv3.net/specs/extensions/server-time for more information.
  *
  * Since: 0.1
  */
-#define IBIS_CAPABILITY_SERVER_TIME "server-time"
+#define IBIS_CAPABILITY_SERVER_TIME "server-time" IBIS_AVAILABLE_MACRO_IN_0_1
+
+/**
+ * IBIS_CAPABILITY_SETNAME:
+ *
+ * The constant string to use when negotiating the `setname` capability.
+ *
+ * See https://ircv3.net/specs/extensions/setname for more information.
+ *
+ * Since: 0.2
+ */
+#define IBIS_CAPABILITY_SETNAME "setname" IBIS_AVAILABLE_MACRO_IN_0_1
+
+/**
+ * IBIS_CAPABILITY_STANDARD_REPLIES:
+ *
+ * The constant string to use when negotiating the `standard-replies`
+ * capability.
+ *
+ * See https://ircv3.net/specs/extensions/standard-replies for more
+ * information.
+ *
+ * Since: 0.2
+ */
+#define IBIS_CAPABILITY_STANDARD_REPLIES "standard-replies" \
+	IBIS_AVAILABLE_MACRO_IN_0_1
+
+/**
+ * IBIS_CAPABILITY_USERHOST_IN_NAMES:
+ *
+ * The constant string to use when negotiating the `userhost-in-names`
+ * capability.
+ *
+ * See https://ircv3.net/specs/extensions/userhost-in-names for more
+ * information.
+ *
+ * Since: 0.2
+ */
+#define IBIS_CAPABILITY_USERHOST_IN_NAMES "userhost-in-names" \
+	IBIS_AVAILABLE_MACRO_IN_0_1
 
 /**
  * IBIS_CTCP_ACTION:
  *
- * A constant representing the CTCP ACTION command.
+ * A constant representing the CTCP `ACTION` command.
+ *
+ * See https://datatracker.ietf.org/doc/html/draft-oakley-irc-ctcp-02#appendix-A.1
+ * for more information.
  *
  * Since: 0.1
  */
@@ -80,9 +452,96 @@
 #define IBIS_CTCP_DELIMITER 001 IBIS_AVAILABLE_MACRO_IN_0_1
 
 /**
+ * IBIS_CTCP_CLIENTINFO:
+ *
+ * A constant representing the CTCP `CLIENTINFO` command.
+ *
+ * See https://datatracker.ietf.org/doc/html/draft-oakley-irc-ctcp-02#appendix-A.2
+ * for more information.
+ *
+ * Since: 0.2
+ */
+#define IBIS_CTCP_CLIENTINFO "CLIENTINFO" IBIS_AVAILABLE_MACRO_IN_0_2
+
+/**
+ * IBIS_CTCP_DCC:
+ *
+ * A constant representing the CTCP `DCC` command.
+ *
+ * See https://datatracker.ietf.org/doc/html/draft-oakley-irc-ctcp-02#appendix-A.3
+ * for more information.
+ *
+ * Since: 0.2
+ */
+#define IBIS_CTCP_DCC "DCC" IBIS_AVAILABLE_MACRO_IN_0_2
+
+/**
+ * IBIS_CTCP_FINGER:
+ *
+ * A constant representing the CTCP `FINGER` command.
+ *
+ * See https://datatracker.ietf.org/doc/html/draft-oakley-irc-ctcp-02#appendix-A.4
+ * for more information.
+ *
+ * Since: 0.2
+ */
+#define IBIS_CTCP_FINGER "FINGER" IBIS_AVAILABLE_MACRO_IN_0_2
+
+/**
+ * IBIS_CTCP_PING:
+ *
+ * A constant representing the CTCP `PING` command.
+ *
+ * See https://datatracker.ietf.org/doc/html/draft-oakley-irc-ctcp-02#appendix-A.5
+ * for more information.
+ *
+ * Since: 0.2
+ */
+#define IBIS_CTCP_PING "PING" IBIS_AVAILABLE_MACRO_IN_0_2
+
+/**
+ * IBIS_CTCP_SOURCE:
+ *
+ * A constant representing the CTCP `SOURCE` command.
+ *
+ * See https://datatracker.ietf.org/doc/html/draft-oakley-irc-ctcp-02#appendix-A.6
+ * for more information.
+ *
+ * Since: 0.2
+ */
+#define IBIS_CTCP_SOURCE "SOURCE" IBIS_AVAILABLE_MACRO_IN_0_2
+
+/**
+ * IBIS_CTCP_TIME:
+ *
+ * A constant representing the CTCP `TIME` command.
+ *
+ * See https://datatracker.ietf.org/doc/html/draft-oakley-irc-ctcp-02#appendix-A.7
+ * for more information.
+ *
+ * Since: 0.2
+ */
+#define IBIS_CTCP_TIME "TIME" IBIS_AVAILABLE_MACRO_IN_0_2
+
+/**
+ * IBIS_CTCP_USERINFO:
+ *
+ * A constant representing the CTCP `USERINFO` command.
+ *
+ * See https://datatracker.ietf.org/doc/html/draft-oakley-irc-ctcp-02#appendix-A.9
+ * for more information.
+ *
+ * Since: 0.2
+ */
+#define IBIS_CTCP_USERINFO "USERINFO" IBIS_AVAILABLE_MACRO_IN_0_1
+
+/**
  * IBIS_CTCP_VERSION:
  *
- * A constant representing the CTCP VERSION command.
+ * A constant representing the CTCP `VERSION` command.
+ *
+ * See https://datatracker.ietf.org/doc/html/draft-oakley-irc-ctcp-02#appendix-A.8
+ * for more information.
  *
  * Since: 0.1
  */
@@ -1619,12 +2078,125 @@
 #define IBIS_RPL_YOUREOPER "381" IBIS_AVAILABLE_MACRO_IN_0_1
 
 /**
- * IBIS_TAG_SERVER_TIME:
- *
- * A constant for the %SERVER_TIME tag.
- *
- * Since: 0.1
+ * IBIS_TAG_ACCOUNT:
+ *
+ * A constant for the `account` tag.
+ *
+ * See https://ircv3.net/specs/extensions/account-tag for more information.
+ *
+ * Since: 0.2
+ */
+#define IBIS_TAG_ACCOUNT "account" IBIS_AVAILABLE_MACRO_IN_0_2
+
+/**
+ * IBIS_TAG_BATCH:
+ *
+ * A constant for the `batch` tag.
+ *
+ * See https://ircv3.net/specs/extensions/batch for more information.
+ *
+ * Since: 0.2
+ */
+#define IBIS_TAG_BATCH "batch" IBIS_AVAILABLE_MACRO_IN_0_2
+
+/**
+ * IBIS_TAG_BOT:
+ *
+ * A constant for the `bot` tag.
+ *
+ * See https://ircv3.net/specs/extensions/bot-mode for more information.
+ *
+ * Since: 0.2
+ */
+#define IBIS_TAG_BOT "bot" IBIS_AVAILABLE_MACRO_IN_0_2
+
+/**
+ * IBIS_TAG_LABEL:
+ *
+ * A constant for the `label` tag.
+ *
+ * Since: 0.2
+ */
+#define IBIS_TAG_LABEL "label" IBIS_AVAILABLE_MACRO_IN_0_2
+
+/**
+ * IBIS_TAG_MSGID:
+ *
+ * A constant for the `msgid` tag.
+ *
+ * See https://ircv3.net/specs/extensions/message-ids for more information.
+ *
+ * Since: 0.2
  */
-#define IBIS_TAG_SERVER_TIME "time" IBIS_AVAILABLE_MACRO_IN_0_1
+#define IBIS_TAG_MSGID "msgid" IBIS_AVAILABLE_MACRO_IN_0_2
+
+/**
+ * IBIS_TAG_MULTILINE_CONCAT:
+ *
+ * A constant for the `multiline-concat` tag.
+ *
+ * See https://ircv3.net/specs/extensions/multiline for more information.
+ *
+ * Since: 0.2
+ */
+#define IBIS_TAG_MULTILINE_CONCAT "draft/multiline-concat" \
+	IBIS_AVAILABLE_MACRO_IN_0_2
+
+/**
+ * IBIS_TAG_TIME:
+ *
+ * A constant for the `time` tag.
+ *
+ * See https://ircv3.net/specs/extensions/server-time for more information.
+ *
+ * Since: 0.2
+ */
+#define IBIS_TAG_TIME "time" IBIS_AVAILABLE_MACRO_IN_0_2
+
+/**
+ * IBIS_TAG_REACT:
+ *
+ * A constant for the `+react` tag.
+ *
+ * See https://ircv3.net/specs/client-tags/react for more information.
+ *
+ * Since: 0.2
+ */
+#define IBIS_TAG_REACT "+draft/react" IBIS_AVAILABLE_MACRO_IN_0_2
+
+/**
+ * IBIS_TAG_REPLY:
+ *
+ * A constant for the `+reply` tag.
+ *
+ * See https://ircv3.net/specs/client-tags/reply for more information.
+ *
+ * Since: 0.2
+ */
+#define IBIS_TAG_REPLY "+draft/reply" IBIS_AVAILABLE_MACRO_IN_0_2
+
+/**
+ * IBIS_TAG_TYPING:
+ *
+ * A constant for the `typing` tag.
+ *
+ * See https://ircv3.net/specs/client-tags/typing for more information.
+ *
+ * Since: 0.2
+ */
+#define IBIS_TAG_TYPING "+typing" IBIS_AVAILABLE_MACRO_IN_0_2
+
+/**
+ * IBIS_TAG_CHANNEL_CONTEXT:
+ *
+ * A constant for the `+channel-context` tag.
+ *
+ * See https://ircv3.net/specs/client-tags/channel-context for more
+ * information.
+ *
+ * Since: 0.2
+ */
+#define IBIS_TAG_CHANNEL_CONTEXT "+draft/channel-context" \
+	IBIS_AVAILABLE_MACRO_IN_0_2
 
 #endif /* IBIS_CONSTANTS_H */
diff --git a/ibis/ibismessage.c b/ibis/ibismessage.c
--- a/ibis/ibismessage.c
+++ b/ibis/ibismessage.c
@@ -496,7 +496,7 @@
 		return NULL;
 	}
 
-	timestamp = ibis_tags_lookup(message->tags, IBIS_TAG_SERVER_TIME);
+	timestamp = ibis_tags_lookup(message->tags, IBIS_TAG_TIME);
 	if(!ibis_str_is_empty(timestamp)) {
 		GTimeZone *tz = g_time_zone_new_utc();
 
diff --git a/ibis/ibisversion.h b/ibis/ibisversion.h
--- a/ibis/ibisversion.h
+++ b/ibis/ibisversion.h
@@ -149,6 +149,30 @@
 #define IBIS_AVAILABLE_TYPE_IN_0_1
 #endif
 
+/**
+ * IBIS_VERSION_0_2:
+ *
+ * A macro that evaluates to the 0.2 version of ibis, in a format that can be
+ * used by the C pre-processor.
+ *
+ * Since: 0.2
+ */
+#define IBIS_VERSION_0_2 (G_ENCODE_VERSION(0, 2))
+
+#if IBIS_VERSION_MAX_ALLOWED < IBIS_VERSION_0_1
+#define IBIS_AVAILABLE_IN_0_2 IBIS_UNAVAILABLE(0, 2)
+#define IBIS_AVAILABLE_STATIC_INLINE_IN_0_2 IBIS_UNAVAILABLE_STATIC_INLINE(0, 2)
+#define IBIS_AVAILABLE_MACRO_IN_0_2 IBIS_UNAVAILABLE_MACRO(0, 2)
+#define IBIS_AVAILABLE_ENUMERATOR_IN_0_2 IBIS_UNAVAILABLE_ENUMERATOR(0, 2)
+#define IBIS_AVAILABLE_TYPE_IN_0_2 IBIS_UNAVAILABLE_TYPE(0, 2)
+#else
+#define IBIS_AVAILABLE_IN_0_2 _IBIS_EXTERN
+#define IBIS_AVAILABLE_STATIC_INLINE_IN_0_2
+#define IBIS_AVAILABLE_MACRO_IN_0_2
+#define IBIS_AVAILABLE_ENUMERATOR_IN_0_2
+#define IBIS_AVAILABLE_TYPE_IN_0_2
+#endif
+
 G_BEGIN_DECLS
 
 /**
diff --git a/meson.build b/meson.build
--- a/meson.build
+++ b/meson.build
@@ -2,7 +2,7 @@
   default_options : ['c_std=c17', 'warning_level=2'],
   license : 'LGPL-2.1-or-later',
   meson_version : '>=1.0.0',
-  version : '0.1.1-dev')
+  version : '0.2.0-dev')
 
 toplevel_inc = include_directories('.')
 
