Fix compiler warnings
This commit is contained in:
parent
71be2abb6a
commit
d01af5b520
|
@ -54,7 +54,7 @@ public class CounterpartInteractionManager : StreamInteractionModule, Object {
|
|||
|
||||
public Gee.List<Jid>? get_typing_jids(Conversation conversation) {
|
||||
if (stream_interactor.connection_manager.get_state(conversation.account) != ConnectionManager.ConnectionState.CONNECTED) return null;
|
||||
if (!typing_since.contains(conversation) || typing_since[conversation].size == 0) return null;
|
||||
if (!typing_since.has_key(conversation) || typing_since[conversation].size == 0) return null;
|
||||
|
||||
var jids = new ArrayList<Jid>();
|
||||
foreach (Jid jid in typing_since[conversation].keys) {
|
||||
|
@ -65,7 +65,7 @@ public class CounterpartInteractionManager : StreamInteractionModule, Object {
|
|||
|
||||
private void on_account_added(Account account) {
|
||||
stream_interactor.module_manager.get_module(account, Xep.ChatMarkers.Module.IDENTITY).marker_received.connect( (stream, jid, marker, id, message_stanza) => {
|
||||
on_chat_marker_received(account, jid, marker, id, message_stanza);
|
||||
on_chat_marker_received.begin(account, jid, marker, id, message_stanza);
|
||||
});
|
||||
stream_interactor.module_manager.get_module(account, Xep.MessageDeliveryReceipts.Module.IDENTITY).receipt_received.connect((stream, jid, id) => {
|
||||
on_receipt_received(account, jid, id);
|
||||
|
@ -76,7 +76,7 @@ public class CounterpartInteractionManager : StreamInteractionModule, Object {
|
|||
}
|
||||
|
||||
private void clear_chat_state(Conversation conversation, Jid jid) {
|
||||
if (!(typing_since.contains(conversation) && typing_since[conversation].contains(jid))) return;
|
||||
if (!(typing_since.has_key(conversation) && typing_since[conversation].has_key(jid))) return;
|
||||
|
||||
typing_since[conversation].unset(jid);
|
||||
received_state(conversation, Xmpp.Xep.ChatStateNotifications.STATE_ACTIVE);
|
||||
|
@ -85,9 +85,7 @@ public class CounterpartInteractionManager : StreamInteractionModule, Object {
|
|||
private void clear_all_chat_states(Account account) {
|
||||
foreach (Conversation conversation in typing_since.keys) {
|
||||
if (conversation.account.equals(account)) {
|
||||
foreach (Jid jid in typing_since[conversation].keys) {
|
||||
received_state(conversation, Xmpp.Xep.ChatStateNotifications.STATE_ACTIVE);
|
||||
}
|
||||
received_state(conversation, Xmpp.Xep.ChatStateNotifications.STATE_ACTIVE);
|
||||
typing_since[conversation].clear();
|
||||
}
|
||||
}
|
||||
|
@ -155,7 +153,7 @@ public class CounterpartInteractionManager : StreamInteractionModule, Object {
|
|||
|
||||
ContentItem? content_item = stream_interactor.get_module(ContentItemStore.IDENTITY).get_item(conversation, 1, message.id);
|
||||
ContentItem? read_up_to_item = stream_interactor.get_module(ContentItemStore.IDENTITY).get_item_by_id(conversation, conversation.read_up_to_item);
|
||||
if (read_up_to_item != null && read_up_to_item.sort_time.compare(content_item.sort_time) > 0) return;
|
||||
if (read_up_to_item != null && read_up_to_item.compare(content_item) > 0) return;
|
||||
conversation.read_up_to_item = content_item.id;
|
||||
} else {
|
||||
// We can't currently handle chat markers in MUCs
|
||||
|
|
|
@ -194,11 +194,11 @@ public class Database : Qlite.Database {
|
|||
public Column<string> entity = new Column.Text("entity");
|
||||
public Column<string> category = new Column.Text("category");
|
||||
public Column<string> type = new Column.Text("type");
|
||||
public Column<string> name = new Column.Text("name");
|
||||
public Column<string> entity_name = new Column.Text("name");
|
||||
|
||||
internal EntityIdentityTable(Database db) {
|
||||
base(db, "entity_identity");
|
||||
init({entity, category, name, type});
|
||||
init({entity, category, entity_name, type});
|
||||
unique({entity, category, type}, "IGNORE");
|
||||
index("entity_identity_idx", {entity});
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ public class EntityCapabilitiesStorage : Xep.EntityCapabilities.Storage, Object
|
|||
.value(db.entity_identity.entity, entity)
|
||||
.value(db.entity_identity.category, identity.category)
|
||||
.value(db.entity_identity.type, identity.type_)
|
||||
.value(db.entity_identity.name, identity.name)
|
||||
.value(db.entity_identity.entity_name, identity.name)
|
||||
.perform();
|
||||
return;
|
||||
}
|
||||
|
@ -62,7 +62,7 @@ public class EntityCapabilitiesStorage : Xep.EntityCapabilities.Storage, Object
|
|||
|
||||
RowOption row = db.entity_identity.select().with(db.entity_identity.entity, "=", entity).single().row();
|
||||
if (row.is_present()) {
|
||||
identity = new Identity(row[db.entity_identity.category], row[db.entity_identity.type], row[db.entity_identity.name]);
|
||||
identity = new Identity(row[db.entity_identity.category], row[db.entity_identity.type], row[db.entity_identity.entity_name]);
|
||||
}
|
||||
identity_cache[entity] = identity;
|
||||
return identity;
|
||||
|
|
|
@ -106,7 +106,7 @@ public class MucManager : StreamInteractionModule, Object {
|
|||
|
||||
// Check if this would be a valid nick
|
||||
try {
|
||||
Jid jid = conversation.counterpart.with_resource(new_nick);
|
||||
conversation.counterpart.with_resource(new_nick);
|
||||
} catch (InvalidJidError error) { return; }
|
||||
|
||||
stream.get_module(Xep.Muc.Module.IDENTITY).change_nick(stream, conversation.counterpart, new_nick);
|
||||
|
|
|
@ -11,7 +11,6 @@ protected class AddGroupchatDialog : Gtk.Dialog {
|
|||
|
||||
[GtkChild] private Stack accounts_stack;
|
||||
[GtkChild] private AccountComboBox account_combobox;
|
||||
[GtkChild] private Label account_label;
|
||||
[GtkChild] private Button ok_button;
|
||||
[GtkChild] private Button cancel_button;
|
||||
[GtkChild] private Entry jid_entry;
|
||||
|
|
|
@ -167,7 +167,7 @@ public class ChatInputController : Object {
|
|||
}
|
||||
|
||||
private void update_moderated_input_status(Account account, Xmpp.Jid? jid = null) {
|
||||
if (conversation.type_ == conversation.Type.GROUPCHAT){
|
||||
if (conversation != null && conversation.type_ == Conversation.Type.GROUPCHAT){
|
||||
Xmpp.Jid? own_jid = stream_interactor.get_module(MucManager.IDENTITY).get_own_jid(conversation.counterpart, conversation.account);
|
||||
if (own_jid == null) return;
|
||||
if (stream_interactor.get_module(MucManager.IDENTITY).is_moderated_room(conversation.account, conversation.counterpart) &&
|
||||
|
|
|
@ -567,7 +567,11 @@ public class ReceivedPipelineListener : StanzaListener<MessageStanza> {
|
|||
string? var_ = field_node.get_attribute("var");
|
||||
if (var_ == "muc#jid"){
|
||||
StanzaNode? value_node = field_node.get_subnode("value", DataForms.NS_URI);
|
||||
if (value_node != null) from_jid = new Jid(value_node.get_string_content());
|
||||
try {
|
||||
if (value_node != null) from_jid = new Jid(value_node.get_string_content());
|
||||
} catch (InvalidJidError e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else if (var_ == "muc#roomnick"){
|
||||
StanzaNode? value_node = field_node.get_subnode("value", DataForms.NS_URI);
|
||||
|
|
|
@ -11,7 +11,6 @@ public class Module : XmppStreamNegotiationModule {
|
|||
StanzaNode query_node = new StanzaNode.build("query", NS_URI).add_self_xmlns();
|
||||
Iq.Stanza request_form_iq = new Iq.Stanza.get(query_node) { to=jid };
|
||||
request_form_iq.to = jid;
|
||||
SourceFunc callback = get_from_server.callback;
|
||||
|
||||
Iq.Stanza iq_result = yield stream.get_module(Iq.Module.IDENTITY).send_iq_async(stream, request_form_iq);
|
||||
return new Form.from_node(stream, iq_result);
|
||||
|
|
Loading…
Reference in a new issue