equal
deleted
inserted
replaced
2144 // set_chatstate(state) |
2144 // set_chatstate(state) |
2145 // Set the current chat state (0=active, 1=composing, 2=paused) |
2145 // Set the current chat state (0=active, 1=composing, 2=paused) |
2146 // If the chat state has changed, call xmpp_send_chatstate() |
2146 // If the chat state has changed, call xmpp_send_chatstate() |
2147 static inline void set_chatstate(int state) |
2147 static inline void set_chatstate(int state) |
2148 { |
2148 { |
2149 #if defined JEP0022 || defined JEP0085 |
2149 #if defined XEP0022 || defined XEP0085 |
2150 if (chatstates_disabled) |
2150 if (chatstates_disabled) |
2151 return; |
2151 return; |
2152 if (!chatmode) |
2152 if (!chatmode) |
2153 state = 0; |
2153 state = 0; |
2154 if (state != chatstate) { |
2154 if (state != chatstate) { |
2173 chatstate_timestamp = 0; |
2173 chatstate_timestamp = 0; |
2174 } |
2174 } |
2175 #endif |
2175 #endif |
2176 } |
2176 } |
2177 |
2177 |
2178 #if defined JEP0022 || defined JEP0085 |
2178 #if defined XEP0022 || defined XEP0085 |
2179 gboolean scr_ChatStatesTimeout(void) |
2179 gboolean scr_ChatStatesTimeout(void) |
2180 { |
2180 { |
2181 time_t now; |
2181 time_t now; |
2182 time(&now); |
2182 time(&now); |
2183 // Check if we're currently composing... |
2183 // Check if we're currently composing... |